"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "9065d59cc91264c1946fd833e9e4545f0ba4829f"
Unverified Commit d6fc12b3 authored by Robin Dong's avatar Robin Dong Committed by GitHub
Browse files

[CUDA] Add CUDA_ARCHITECTURES to fix CMake warnings (#3754) (#4268)

parent 90677e43
...@@ -210,6 +210,7 @@ if(USE_CUDA) ...@@ -210,6 +210,7 @@ if(USE_CUDA)
function(add_histogram hsize hname hadd hconst hdir) function(add_histogram hsize hname hadd hconst hdir)
add_library(histo${hsize}${hname} OBJECT src/treelearner/kernels/histogram${hsize}.cu) 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_SEPARABLE_COMPILATION ON)
set_target_properties(histo${hsize}${hname} PROPERTIES CUDA_ARCHITECTURES OFF)
if(hadd) if(hadd)
list(APPEND histograms histo${hsize}${hname}) list(APPEND histograms histo${hsize}${hname})
set(histograms ${histograms} PARENT_SCOPE) set(histograms ${histograms} PARENT_SCOPE)
...@@ -434,11 +435,13 @@ endif() ...@@ -434,11 +435,13 @@ endif()
if(USE_CUDA) if(USE_CUDA)
set_target_properties(lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON) set_target_properties(lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)
set_target_properties(lightgbm PROPERTIES CUDA_ARCHITECTURES OFF)
TARGET_LINK_LIBRARIES( TARGET_LINK_LIBRARIES(
lightgbm lightgbm
${histograms} ${histograms}
) )
set_target_properties(_lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON) set_target_properties(_lightgbm PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)
set_target_properties(_lightgbm PROPERTIES CUDA_ARCHITECTURES OFF)
TARGET_LINK_LIBRARIES( TARGET_LINK_LIBRARIES(
_lightgbm _lightgbm
${histograms} ${histograms}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment