Ubuntu下安装GPU版xgboost python库

来源:互联网 发布:js int 转date 编辑:程序博客网 时间:2024/06/07 02:25

安装过程见官方文档:http://xgboost.readthedocs.io/en/latest/build.html

主要有以下两步

1. 下载源代码

git clone --recursive https://github.com/dmlc/xgboost

2. 编译GPU共享库

cd xgboostmkdir buildcd buildcmake .. -DUSE_CUDA=ONmake -j

3. 安装Python包

在xgboost根目录下

cd python-packagesudo python3 setup.py install

测试GPU加速

python3 tests/benchmark/benchmark.py

原创粉丝点击