diff --git a/doc/build.rst b/doc/build.rst index 220abc8f1..ef344d89c 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -168,6 +168,12 @@ XGBoost can be built with GPU support for both Linux and Windows using CMake. GP An up-to-date version of the CUDA toolkit is required. +.. note:: Checking your compiler version + + CUDA is really picky about supported compilers, a table for the compatible compilers for the latests CUDA version on Linux can be seen `here `_. + + Some distros package a compatible ``gcc`` version with CUDA. If you run into compiler errors with ``nvcc``, try specifying the correct compiler with ``-DCMAKE_CXX_COMPILER=/path/to/correct/g++ -DCMAKE_C_COMPILER=/path/to/correct/gcc``. On Arch Linux, for example, both binaries can be found under ``/opt/cuda/bin/``. + From the command line on Linux starting from the XGBoost directory: .. code-block:: bash @@ -177,6 +183,10 @@ From the command line on Linux starting from the XGBoost directory: cmake .. -DUSE_CUDA=ON make -j4 +.. note:: Specifying compute capability + + To speed up compilation, the compute version specific to your GPU could be passed to cmake as, e.g., ``-DGPU_COMPUTE_VER=50``. A quick explanation and numbers for some architectures can be found `here `_. + .. note:: Enabling distributed GPU training By default, distributed GPU training is disabled and only a single GPU will be used. To enable distributed GPU training, set the option ``USE_NCCL=ON``. Distributed GPU training depends on NCCL2, available at `this link `_. Since NCCL2 is only available for Linux machines, **distributed GPU training is available only for Linux**. @@ -206,7 +216,6 @@ On Windows, run CMake as follows: cmake .. -G"Visual Studio 15 2017 Win64" -T v140,cuda=8.0 -DUSE_CUDA=ON -To speed up compilation, the compute version specific to your GPU could be passed to cmake as, e.g., ``-DGPU_COMPUTE_VER=50``. The above cmake configuration run will create an ``xgboost.sln`` solution file in the build directory. Build this solution in release mode as a x64 build, either from Visual studio or from command line: .. code-block:: bash