Skip to content
Merged
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
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ if(USE_CUDA OR USE_CUSOLVER_LCAO)
set(CMAKE_CUDA_ARCHITECTURES
60 # P100
70 # V100
# Add your CUDA arch here
# Check the Compute Capability version of your GPU at:
# https://en.wikipedia.org/wiki/CUDA#GPUs_supported
)
if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES 75) # T4
Expand All @@ -250,7 +253,7 @@ if(USE_CUDA OR USE_CUSOLVER_LCAO)
list(APPEND CMAKE_CUDA_ARCHITECTURES 86)
endif()
if (CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.8)
list(APPEND CMAKE_CUDA_ARCHITECTURES 89)
list(APPEND CMAKE_CUDA_ARCHITECTURES 89 90)
endif()
endif()
enable_language(CUDA)
Expand Down Expand Up @@ -387,6 +390,9 @@ endif()

if(ENABLE_DEEPKS)
set(CMAKE_CXX_STANDARD 14)
# Torch uses outdated components to detech CUDA arch, causing failure on latest CUDA kits.
# See above for setting CMAKE_CUDA_ARCHITECTURES
set(TORCH_CUDA_ARCH_LIST CMAKE_CUDA_ARCHITECTURES)
find_package(Torch REQUIRED)
include_directories(${TORCH_INCLUDE_DIRS})
target_link_libraries(${ABACUS_BIN_NAME} deepks)
Expand Down