diff --git a/CMakeLists.txt b/CMakeLists.txt index 48c1ac040f26..05775911fc6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,6 +210,7 @@ if(USE_CUDA) function(add_histogram hsize hname hadd hconst hdir) add_library(histo${hsize}${hname} OBJECT src/treelearner/kernels/histogram${hsize}.cu) set_target_properties(histo${hsize}${hname} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + set_target_properties(histo${hsize}${hname} PROPERTIES CUDA_ARCHITECTURES OFF) if(hadd) list(APPEND histograms histo${hsize}${hname}) set(histograms ${histograms} PARENT_SCOPE) @@ -434,11 +435,13 @@ endif() if(USE_CUDA) set_target_properties(lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON) + set_target_properties(lightgbm PROPERTIES CUDA_ARCHITECTURES OFF) TARGET_LINK_LIBRARIES( lightgbm ${histograms} ) set_target_properties(_lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON) + set_target_properties(_lightgbm PROPERTIES CUDA_ARCHITECTURES OFF) TARGET_LINK_LIBRARIES( _lightgbm ${histograms}