Skip to content
Hui Liu edited this page Oct 28, 2023 · 19 revisions

Welcome to the XGBoost wiki!

Google Test

If you are interested in unit tests, please install Google Test v1.12.x, not v1.13.x, as v1.13.x changed build environment, upstream XGBoost has not adopted. Google test requires libgtest-dev package.

Code

Clone the code from our repo

  1. git clone https://github.com/ROCmSoftwarePlatform/xgboost
  2. cd xgboost
  3. git checkout master-rocm

or a tag with rocm suffix, such as v2.0.1-rocm

Submodules

XGBoost ROCm support requires a few modules, which can be initialized as,

git submodule update --init --recursive

Configure The following export may be required for some systems, and the ROCm path depends on installation,

export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/opt/rocm/lib/cmake:/opt/rocm/lib/cmake/AMDDeviceLibs/

  1. mkdir build
  2. cd build
  3. cmake -DUSE_HIP=ON ../
  4. or cmake -DUSE_HIP=1 ../

The USE_HIP macro enables HIP/ROCm support. USE_RCCL enables RCCL. GOOGLE_TEST enables Google test.

Compile

To compile, run command,

make -j

Python Support

After compilation, XGBoost can be installed as a Python package and supports a wide range of applications,

  1. cd python-package/
  2. pip3 install .
Clone this wiki locally