Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for compiling with cuda 12.x #10568

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmake/cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ if(BUILD_CUDA)
# GeForce RTX 30xx
list(APPEND CMAKE_CUDA_ARCHITECTURES 86-real)
endif()

if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
# GeForce RTX 40xx
list(APPEND CMAKE_CUDA_ARCHITECTURES 89-real)
endif()

if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
# H100, H20
list(APPEND CMAKE_CUDA_ARCHITECTURES 90-real)
endif()
endif()

foreach(CUDA_ARCH ${CMAKE_CUDA_ARCHITECTURES})
Expand Down
9 changes: 8 additions & 1 deletion cmake/third_party/FindCUDNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ if(CUDNN_FOUND)

set(CUDNN_INCLUDE_DIRS ${CUDNN_INCLUDE_DIR})

if(NOT CUDNN_STATIC AND CUDNN_VERSION_MAJOR GREATER_EQUAL 8)
if(NOT CUDNN_STATIC AND CUDNN_VERSION_MAJOR GREATER_EQUAL 9)
# skipping: libcudnn_adv_infer.so libcudnn_adv_train.so
set(CUDNN_DYNAMIC_NAMES libcudnn_cnn.so libcudnn_ops.so)
get_filename_component(CUDNN_LIBRARY_DIRECTORY ${CUDNN_LIBRARY} DIRECTORY)
foreach(CUDNN_DYNAMIC_NAME ${CUDNN_DYNAMIC_NAMES})
list(APPEND CUDNN_LIBRARIES ${CUDNN_LIBRARY_DIRECTORY}/${CUDNN_DYNAMIC_NAME})
endforeach()
elseif(NOT CUDNN_STATIC AND CUDNN_VERSION_MAJOR GREATER_EQUAL 8)
# skipping: libcudnn_adv_infer.so libcudnn_adv_train.so
set(CUDNN_DYNAMIC_NAMES libcudnn_cnn_infer.so libcudnn_cnn_train.so libcudnn_ops_infer.so
libcudnn_ops_train.so)
Expand Down
Loading