Skip to content

Instantly share code, notes, and snippets.

@ronaldokun
Last active May 23, 2018 22:00
Show Gist options
  • Select an option

  • Save ronaldokun/2a9f9c3bdeb1646231a7bcb6f32aca0f to your computer and use it in GitHub Desktop.

Select an option

Save ronaldokun/2a9f9c3bdeb1646231a7bcb6f32aca0f to your computer and use it in GitHub Desktop.
Include GPU support in xgboost
To support GPU. The xgboost library must be build from the github code.
The instructions on https://xgboost.readthedocs.io/en/latest/build.html are straightforward.
Except for a little detail:
we must use:
sudo -s
python setup.pu install
instead of the instruction given on the link: sudo python setup.py install
When using sudo the python system is used, instead the one in Anaconda with the libraries needeed to install the python plugin
To use it in python we must add a parameter 'tree_method:
param['updater'] = 'grow_gpu'
it's automatically enabled if one of the following tree methos is used
param['tree_method'] = 'gpu_hist' or 'gpu_exact'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment