Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIfR-BDG
psrdada_cpp
Commits
d5b6684a
Commit
d5b6684a
authored
Apr 16, 2021
by
Tobias Winchen
Browse files
Fix compile flags for debug mode
parent
48258b57
Changes
1
Hide whitespace changes
Inline
Side-by-side
cmake/cuda.cmake
View file @
d5b6684a
...
...
@@ -15,22 +15,23 @@ if(ENABLE_CUDA)
# Pass options to NVCC ( -ccbin /path --compiler-options -lfftw3f --compiler-options -lm --verbose)
list
(
APPEND CUDA_NVCC_FLAGS -DENABLE_CUDA --std c++
${
CMAKE_CXX_STANDARD
}
-Wno-deprecated-gpu-targets --ptxas-options=-v
)
list
(
APPEND CUDA_NVCC_FLAGS_DEBUG --debug; --device-debug; --generate-line-info -Xcompiler
"-Wextra"
-Xcompiler
"-Werror"
)
list
(
APPEND CUDA_NVCC_FLAGS_DEBUG --debug --generate-line-info -Xcompiler
"-Wextra"
)
# Do not use Xcompiler -Werror here as it prevents some kernels from execution
#list(APPEND CUDA_NVCC_FLAGS_DEBUG --debug --device-debug -Xcompiler "-Wextra" -Xcompiler "-Werror")
list
(
APPEND CUDA_NVCC_FLAGS_PROFILE --generate-line-info
)
#list(APPEND CUDA_NVCC_FLAGS -arch compute_35) # minumum compute level (Sps restriction)
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
uppercase_CMAKE_BUILD_TYPE
)
if
(
NOT uppercase_CMAKE_BUILD_TYPE MATCHES
"DEBUG"
)
message
(
"Enabling device specific compilation as not in DEBUG mode"
)
message
(
"Enabling device specific compilation as not in DEBUG mode"
)
list
(
APPEND CUDA_NVCC_FLAGS -gencode arch=compute_61,code=sm_61
)
# GTX1080Ti, Titan Xp
list
(
APPEND CUDA_NVCC_FLAGS -gencode arch=compute_61,code=compute_61
)
# Compatibility
#list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_52,code=sm_52) # TitanX
#list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_50,code=sm_50) # Maxwell
#list(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_37,code=sm_37) # K80
if
(
CUDA_VERSION VERSION_GREATER 10.0
)
list
(
APPEND CUDA_NVCC_FLAGS -gencode arch=compute_75,code=sm_75
)
# RTX2080, CUDA10
endif
()
endif
(
NOT uppercase_CMAKE_BUILD_TYPE MATCHES
"DEBUG"
)
if
(
CUDA_VERSION VERSION_GREATER 10.0
)
list
(
APPEND CUDA_NVCC_FLAGS -gencode arch=compute_75,code=sm_75
)
# RTX2080, CUDA10
endif
()
list
(
APPEND CUDA_NVCC_FLAGS -O3 -use_fast_math -restrict
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment