tRevert "src/CMakeLists.txt: remove arch and code specification" - sphere - GPU… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 27916d04222ad787d6bebfec20de401d408c64ff | |
parent 0b1e0667a5afb71f96e13e9bcbc5ef84de0fcc08 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 11 Jan 2021 11:25:57 +0100 | |
Revert "src/CMakeLists.txt: remove arch and code specification" | |
This reverts commit 75a51fc9ac35e999426be7aee9e30d474c358eb0. | |
Diffstat: | |
M src/CMakeLists.txt | 20 ++++++++++++++------ | |
1 file changed, 14 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | |
t@@ -17,12 +17,20 @@ INCLUDE(FindCUDA) | |
# Additional NVCC command line arguments | |
# NOTE: Multiple arguments must be semi-colon selimited | |
-SET(CUDA_NVCC_FLAGS | |
- "--use_fast_math;-O3;--fmad=false -ccbin gcc") | |
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc-8.3") | |
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc-4.6") | |
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc;-Xcompiler -fPIC") | |
- #"--use_fast_math;-O3;--fmad=false;-ccbin clang-3.8") | |
+IF (GPU_GENERATION EQUAL 1) # Kepler | |
+ SET(CUDA_NVCC_FLAGS | |
+ "--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35… | |
+ELSE() # Fermi | |
+ SET(CUDA_NVCC_FLAGS | |
+ "--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20… | |
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20… | |
+ENDIF (GPU_GENERATION EQUAL 1) | |
SET(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}") | |