From 708e3b0645cc9a8f5df6a0f1e5bb84fab4b1a335 Mon Sep 17 00:00:00 2001 From: Robin Dong Date: Mon, 10 May 2021 00:01:58 +0000 Subject: [PATCH] [CUDA] Add CMake property to fix warning (#3754) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) 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}