Commit 0aa90c53 authored by Jeff Daily's avatar Jeff Daily
Browse files

add rocm docs

parent 9655896f
......@@ -738,6 +738,65 @@ macOS
The CUDA version is not supported on macOS.
Build ROCm Version
~~~~~~~~~~~~~~~~~~
The `original GPU version <#build-gpu-version>`__ of LightGBM (``device_type=gpu``) is based on OpenCL.
The ROCm-based version (``device_type=cuda``) is a separate implementation. Yes, the ROCm version reuses the ``device_type=cuda`` as a convenience for users. Use this version in Linux environments with an AMD GPU.
Windows
^^^^^^^
The ROCm version is not supported on Windows.
Use the `GPU version <#build-gpu-version>`__ (``device_type=gpu``) for GPU acceleration on Windows.
Linux
^^^^^
On Linux, a ROCm version of LightGBM can be built using
- **CMake**, **gcc** and **ROCm**;
- **CMake**, **Clang** and **ROCm**.
Please refer to `the ROCm docs`_ for **ROCm** libraries installation.
After compilation the executable and ``.so`` files will be in ``LightGBM/`` folder.
gcc
***
1. Install `CMake`_, **gcc** and **ROCm**.
2. Run the following commands:
.. code:: sh
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
cmake -B build -S . -DUSE_ROCM=ON
cmake --build build -j4
Clang
*****
1. Install `CMake`_, **Clang**, **OpenMP** and **ROCm**.
2. Run the following commands:
.. code:: sh
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
export CXX=clang++-14 CC=clang-14 # replace "14" with version of Clang installed on your machine
cmake -B build -S . -DUSE_ROCM=ON
cmake --build build -j4
macOS
^^^^^
The ROCm version is not supported on macOS.
Build Java Wrapper
~~~~~~~~~~~~~~~~~~
......@@ -1047,6 +1106,8 @@ gcc
.. _this detailed guide: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
.. _the ROCm docs: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/
.. _following docs: https://github.com/google/sanitizers/wiki
.. _Ninja: https://ninja-build.org
......@@ -264,7 +264,7 @@ Core Parameters
- ``cpu`` supports all LightGBM functionality and is portable across the widest range of operating systems and hardware
- ``cuda`` offers faster training than ``gpu`` or ``cpu``, but only works on GPUs supporting CUDA
- ``cuda`` offers faster training than ``gpu`` or ``cpu``, but only works on GPUs supporting CUDA or ROCm
- ``gpu`` can be faster than ``cpu`` and works on a wider range of GPUs than CUDA
......@@ -272,7 +272,7 @@ Core Parameters
- **Note**: for the faster speed, GPU uses 32-bit float point to sum up by default, so this may affect the accuracy for some tasks. You can set ``gpu_use_dp=true`` to enable 64-bit float point, but it will slow down the training
- **Note**: refer to `Installation Guide <./Installation-Guide.rst>`__ to build LightGBM with GPU or CUDA support
- **Note**: refer to `Installation Guide <./Installation-Guide.rst>`__ to build LightGBM with GPU, CUDA, or ROCm support
- ``seed`` :raw-html:`<a id="seed" title="Permalink to this parameter" href="#seed">&#x1F517;&#xFE0E;</a>`, default = ``None``, type = int, aliases: ``random_seed``, ``random_state``
......
......@@ -22,6 +22,7 @@ $(() => {
"#build-mpi-version",
"#build-gpu-version",
"#build-cuda-version",
"#build-rocm-version",
"#build-java-wrapper",
"#build-python-package",
"#build-r-package",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment