Skip to content

Commit

Permalink
Allow setting CUDA capability.
Browse files Browse the repository at this point in the history
  • Loading branch information
David2 Lin committed Mar 18, 2021
1 parent 1b2399b commit ea33e7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ endif()

find_package(CUDA)
if(CUDA_FOUND)
set(CUDA_CAPABILITY 50 CACHE STRING "CUDA capability without '.'")
set(CUDA_PROPAGATE_HOST_FLAGS ON)
set(KALDI_CUDA_NVCC_FLAGS "--default-stream=per-thread;-std=c++${CMAKE_CXX_STANDARD}")
list(APPEND KALDI_CUDA_NVCC_FLAGS "-gencode arch=compute_${CUDA_CAPABILITY},code=sm_${CUDA_CAPABILITY}")
if(MSVC)
list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler /permissive-,/FS,/wd4819,/EHsc,/bigobj")
list(APPEND KALDI_CUDA_NVCC_FLAGS "-Xcompiler /wd4018,/wd4244,/wd4267,/wd4291,/wd4305")
Expand Down

0 comments on commit ea33e7b

Please sign in to comment.