๐Ÿ Python & library/Scikit-Learn

XGBoost GPU ๋กœ ๊ฐ€์†ํ•˜๊ธฐ

๋ณต๋งŒ 2022. 4. 13. 14:28

์ถœ์ฒ˜: https://xgboost.readthedocs.io/en/stable/gpu/index.html

 

XGBoost GPU Support — xgboost 1.5.2 documentation

XGBoost GPU Support This page contains information about GPU algorithms supported in XGBoost. Note CUDA 10.0, Compute Capability 3.5 required The GPU algorithms in XGBoost require a graphics card with compute capability 3.5 or higher, with CUDA toolkits 10

xgboost.readthedocs.io

 

CUDA 10.0 ์ด์ƒ์˜ ๋ฒ„์ „์ด ์„ค์น˜๋˜์–ด ์žˆ์œผ๋ฉด GPU๋กœ XGBoost๋ฅผ ๊ฐ€์†ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

๋ชจ๋ธ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด tree_method์™€ gpu_id parameter๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฃผ๋ฉด ๋œ๋‹ค.

XGBRegressor(tree_method='gpu_hist', gpu_id=0)

 

gpu_id๋Š” ์‚ฌ์šฉํ•  gpu์˜ ๋ฒˆํ˜ธ๋กœ, nvidia-smi๋ฅผ ์ด์šฉํ•ด ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

๋ฐ˜์‘ํ˜•