add hip support
This commit is contained in:
parent
cafbfce51f
commit
eb30cb6293
@ -16,6 +16,11 @@ if (USE_CUDA)
|
||||
target_sources(objxgboost PRIVATE ${CUDA_SOURCES})
|
||||
endif (USE_CUDA)
|
||||
|
||||
if (USE_HIP)
|
||||
file(GLOB_RECURSE HIP_SOURCES *.cu *.cuh)
|
||||
target_sources(objxgboost PRIVATE ${HIP_SOURCES})
|
||||
endif (USE_HIP)
|
||||
|
||||
target_include_directories(objxgboost
|
||||
PRIVATE
|
||||
${xgboost_SOURCE_DIR}/include
|
||||
@ -33,6 +38,7 @@ msvc_use_static_runtime()
|
||||
|
||||
# This grouping organises source files nicely in visual studio
|
||||
auto_source_group("${CUDA_SOURCES}")
|
||||
auto_source_group("${HIP_SOURCES}")
|
||||
auto_source_group("${CPU_SOURCES}")
|
||||
|
||||
#-- End object library
|
||||
|
||||
@ -13,6 +13,11 @@ if (USE_CUDA)
|
||||
list(APPEND TEST_SOURCES ${CUDA_TEST_SOURCES})
|
||||
endif (USE_CUDA)
|
||||
|
||||
if (USE_HIP)
|
||||
file(GLOB_RECURSE HIP_TEST_SOURCES "*.cu")
|
||||
list(APPEND TEST_SOURCES ${HIP_TEST_SOURCES})
|
||||
endif (USE_HIP)
|
||||
|
||||
file(GLOB_RECURSE ONEAPI_TEST_SOURCES "plugin/*_oneapi.cc")
|
||||
if (NOT PLUGIN_UPDATER_ONEAPI)
|
||||
list(REMOVE_ITEM TEST_SOURCES ${ONEAPI_TEST_SOURCES})
|
||||
@ -33,6 +38,11 @@ if (USE_CUDA AND PLUGIN_RMM)
|
||||
target_include_directories(testxgboost PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||
endif (USE_CUDA AND PLUGIN_RMM)
|
||||
|
||||
if (USE_HIP AND PLUGIN_RMM)
|
||||
find_package(HIP)
|
||||
target_include_directories(testxgboost PRIVATE ${HIP_INCLUDE_DIRS})
|
||||
endif (USE_HIP AND PLUGIN_RMM)
|
||||
|
||||
target_include_directories(testxgboost
|
||||
PRIVATE
|
||||
${GTEST_INCLUDE_DIRS}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user