Skip to content

Instantly share code, notes, and snippets.

@RayOnFire
Created November 12, 2019 03:35
Show Gist options
  • Select an option

  • Save RayOnFire/639fba0cebafa94ade951d0f9cab7475 to your computer and use it in GitHub Desktop.

Select an option

Save RayOnFire/639fba0cebafa94ade951d0f9cab7475 to your computer and use it in GitHub Desktop.
没有sudo的情况下安装GPU版本LightGBM
conda install cmake libboost -y
git clone https://github.com/KhronosGroup/OpenCL-Headers
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
mkdir build ; cd build
cmake -DOpenCL_LIBRARY=/usr/lib/x86_64-linux-gnu/libOpenCL.so.1 -DOpenCL_INCLUDE_DIR=../../OpenCL-Headers/ ..
# if you have installed NVIDIA CUDA to a customized location, you should specify paths to OpenCL headers and library like the following:
# cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..
make -j$(nproc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment