add hip support

This commit is contained in:
amdsc21
2023-03-07 03:49:52 +01:00
parent cafbfce51f
commit eb30cb6293
2 changed files with 16 additions and 0 deletions

View File

@@ -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}