* [CI] Add RMM as an optional dependency * Replace caching allocator with pool allocator from RMM * Revert "Replace caching allocator with pool allocator from RMM" This reverts commit e15845d4e72e890c2babe31a988b26503a7d9038. * Use rmm::mr::get_default_resource() * Try setting default resource (doesn't work yet) * Allocate pool_mr in the heap * Prevent leaking pool_mr handle * Separate EXPECT_DEATH() in separate test suite suffixed DeathTest * Turn off death tests for RMM * Address reviewer's feedback * Prevent leaking of cuda_mr * Fix Jenkinsfile syntax * Remove unnecessary function in Jenkinsfile * [CI] Install NCCL into RMM container * Run Python tests * Try building with RMM, CUDA 10.0 * Do not use RMM for CUDA 10.0 target * Actually test for test_rmm flag * Fix TestPythonGPU * Use CNMeM allocator, since pool allocator doesn't yet support multiGPU * Use 10.0 container to build RMM-enabled XGBoost * Revert "Use 10.0 container to build RMM-enabled XGBoost" This reverts commit 789021fa31112e25b683aef39fff375403060141. * Fix Jenkinsfile * [CI] Assign larger /dev/shm to NCCL * Use 10.2 artifact to run multi-GPU Python tests * Add CUDA 10.0 -> 11.0 cross-version test; remove CUDA 10.0 target * Rename Conda env rmm_test -> gpu_test * Use env var to opt into CNMeM pool for C++ tests * Use identical CUDA version for RMM builds and tests * Use Pytest fixtures to enable RMM pool in Python tests * Move RMM to plugin/CMakeLists.txt; use PLUGIN_RMM * Use per-device MR; use command arg in gtest * Set CMake prefix path to use Conda env * Use 0.15 nightly version of RMM * Remove unnecessary header * Fix a unit test when cudf is missing * Add RMM demos * Remove print() * Use HostDeviceVector in GPU predictor * Simplify pytest setup; use LocalCUDACluster fixture * Address reviewers' commments Co-authored-by: Hyunsu Cho <chohyu01@cs.wasshington.edu>
54 lines
2.0 KiB
CMake
54 lines
2.0 KiB
CMake
if (PLUGIN_LZ4)
|
|
target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/lz4/sparse_page_lz4_format.cc)
|
|
target_link_libraries(objxgboost PUBLIC lz4)
|
|
endif (PLUGIN_LZ4)
|
|
|
|
if (PLUGIN_DENSE_PARSER)
|
|
target_sources(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/plugin/dense_parser/dense_libsvm.cc)
|
|
endif (PLUGIN_DENSE_PARSER)
|
|
|
|
if (PLUGIN_RMM)
|
|
find_path(RMM_INCLUDE "rmm"
|
|
HINTS "$ENV{RMM_ROOT}/include")
|
|
|
|
find_library(RMM_LIBRARY "rmm"
|
|
HINTS "$ENV{RMM_ROOT}/lib" "$ENV{RMM_ROOT}/build")
|
|
|
|
if ((NOT RMM_LIBRARY) OR (NOT RMM_INCLUDE))
|
|
message(FATAL_ERROR "Could not locate RMM library")
|
|
endif ()
|
|
|
|
message(STATUS "RMM: RMM_LIBRARY set to ${RMM_LIBRARY}")
|
|
message(STATUS "RMM: RMM_INCLUDE set to ${RMM_INCLUDE}")
|
|
|
|
target_include_directories(objxgboost PUBLIC ${RMM_INCLUDE})
|
|
target_link_libraries(objxgboost PUBLIC ${RMM_LIBRARY} cuda)
|
|
target_compile_definitions(objxgboost PUBLIC -DXGBOOST_USE_RMM=1)
|
|
endif (PLUGIN_RMM)
|
|
|
|
if (PLUGIN_UPDATER_ONEAPI)
|
|
add_library(oneapi_plugin OBJECT
|
|
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/regression_obj_oneapi.cc
|
|
${xgboost_SOURCE_DIR}/plugin/updater_oneapi/predictor_oneapi.cc)
|
|
target_include_directories(oneapi_plugin
|
|
PRIVATE
|
|
${xgboost_SOURCE_DIR}/include
|
|
${xgboost_SOURCE_DIR}/dmlc-core/include
|
|
${xgboost_SOURCE_DIR}/rabit/include)
|
|
target_compile_definitions(oneapi_plugin PUBLIC -DXGBOOST_USE_ONEAPI=1)
|
|
target_link_libraries(oneapi_plugin PUBLIC -fsycl)
|
|
set_target_properties(oneapi_plugin PROPERTIES
|
|
COMPILE_FLAGS -fsycl
|
|
CXX_STANDARD 14
|
|
CXX_STANDARD_REQUIRED ON
|
|
POSITION_INDEPENDENT_CODE ON)
|
|
if (USE_OPENMP)
|
|
find_package(OpenMP REQUIRED)
|
|
target_link_libraries(oneapi_plugin PUBLIC OpenMP::OpenMP_CXX)
|
|
endif (USE_OPENMP)
|
|
# Get compilation and link flags of oneapi_plugin and propagate to objxgboost
|
|
target_link_libraries(objxgboost PUBLIC oneapi_plugin)
|
|
# Add all objects of oneapi_plugin to objxgboost
|
|
target_sources(objxgboost INTERFACE $<TARGET_OBJECTS:oneapi_plugin>)
|
|
endif (PLUGIN_UPDATER_ONEAPI)
|