方法 一
https://blog.csdn.net/m0_37327467/article/details/81324690
方法二
https://zhuanlan.zhihu.com/p/29904369
環境cmake 3.17 +cuda 10.2 +vs2017
我是將兩種方法結合了
GPU版本使用,在cpu使用基礎上增加兩個參數,gpu_id=0,tree_method='gpu_hist' 即可完成使用
問題解決:
問題:python setup.py install 報錯, 沒有找到lib這個文件夾
解決:在報錯目錄中新建了一個lib文件夾,把xgboost.dll 復制到報錯的文件夾中,還報錯說不能創建lib文件夾,把xgboost卸載了,再執行python setup.py install