日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

xgboost 多gpu支持 编译

發布時間:2024/1/17 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 xgboost 多gpu支持 编译 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

xgboost 多gpu支持 編譯

Ubuntu 18.04.2
Linux 4.15.0-46-generic
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

cuda 10.0
https://docs.nvidia.com/cuda/archive/10.0/cuda-installation-guide-linux/index.html#verify-you-have-supported-version-of-linux
安裝略

nccl2
git clone https://github.com/NVIDIA/nccl.git
cd nccl
make -j src.build

xgboost
(建議選擇穩定版源碼編譯 如 0.82)

mkdir xgboost-src

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

git clone https://github.com/dmlc/xgboost.git
git submodule init
git submodule update

設置版本0.82(!然而最后安裝后的版本是0.81)
git checkout 3f83dcd

mkdir build
cd build
cmake .. -DUSE_CUDA=ON -DUSE_NCCL=ON -DNCCL_ROOT=/xxx/install/nccl-src/nccl/build
make -j4

直至出現類似結果
...
Scanning dependencies of target gpuxgboost
[ 95%] Linking CXX static library libgpuxgboost.a
[ 95%] Built target gpuxgboost
Scanning dependencies of target runxgboost
[ 97%] Building CXX object CMakeFiles/runxgboost.dir/src/cli_main.cc.o
[ 98%] Linking CXX executable ../xgboost
[ 98%] Built target runxgboost
Scanning dependencies of target xgboost
[100%] Linking CXX shared library ../lib/libxgboost.so
[100%] Built target xgboost
cd ../python-package
python setup.py install

備注: 如果切換 使用 update-alternatives gcc/g++ 版本時,可能會出現各種引用異常,此時建議切換到gcc/g++某個已安裝版本(如7.3), 重啟機器

------------------------------------------------------
tensorflow (對應cuda 10.0)
tensorflow-gpu 1.13.1
pip install tensorflow-gpu

------------------------------------------------------
torch (對應cuda 10.0)
pip install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip install torchvision

轉載于:https://www.cnblogs.com/kdyi/p/10636988.html

總結

以上是生活随笔為你收集整理的xgboost 多gpu支持 编译的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。