Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 0e24755

Browse files
committed
keep some optimisation of partial_piv_lu.cpp in debug builds
e
1 parent 2857e2d commit 0e24755

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

coreneuron/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ if(CORENRN_ENABLE_GPU)
120120
# OpenACC/OpenMP annotations.
121121
if(CORENRN_ENABLE_NMODL AND EXISTS ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp)
122122
list(APPEND CORENEURON_CODE_FILES ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp)
123+
if(CORENRN_ENABLE_GPU
124+
AND CORENRN_HAVE_NVHPC_COMPILER
125+
AND CMAKE_BUILD_TYPE STREQUAL "Debug")
126+
# In this case OpenAccHelper.cmake passes -gpu=debug, which makes these Eigen functions
127+
# extremely slow. Downgrade that to -gpu=lineinfo for this file.
128+
set_source_files_properties(${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp
129+
PROPERTIES COMPILE_FLAGS "-gpu=lineinfo,nodebug -O1")
130+
endif()
123131
endif()
124132
endif()
125133

0 commit comments

Comments
 (0)