Closed caxelrud closed 4 years ago
In order to be able to train on gpu, you should first compile xgboost with cuda flag and then replace the .so
file in your julia packages folder with this new file. Here's how you can do that
Clone xgboost repo, and pull the submodules
git clone https://github.com/dmlc/xgboost.git
cd xgboost/
git submodule update --init --recursive
Build xgboost
mkdir build
cd build
cmake .. -DUSE_CUDA=ON
make -j4
This creates a libxgboost.so
file in the lib
folder.
Copy this file to the XGBoost package directory to the location where julia installed xgboost
cp xgboost/lib/libxgboost.so .julia/packages/XGBoost/...../deps/usr/lib
After this you should be able to train on gpu with
bst = xgboost(data, ....,tree_method="gpu_hist")
I am using Windows 10. I got the dll from this site: https://picnet.com.au/blog/xgboost-windows-x64-binaries-for-download/ And replaced at the Julia package location. It is not complaining when using method="gpu_hist" so it looks like is working.
closing this issue, this is the way to do this for now.
Is it possible to use parameters as "tree_method= gpu_hist"? Are examples available?