如何在Python中选择XGBoost的GPU设备
我正在共享Linux服务器上的Python中运行XGBoost(极端梯度提升),该服务器配备了多个GPU。当我在GPU上运行XGBoost时,XGBOOST会自动选择GPU设备0。是否有人知道如何使XGBoost选择另一个GPU? (GPU0通常太忙了)
I'm running XGBoost (eXtreme Gradient Boosting) in Python on a shared linux server, which is equipped with multiple GPUs. When I run XGBoost on a GPU, XGBoost automatically selects GPU device 0. Does anybody know how I can make XGBoost to select another GPU? (gpu0 is normally too busy )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
调查源代码,事实证明,可以通过将GPU设备编号分配给 gpu_id 来选择在类的构造函数中。例如,
Looking into the source code, it turned out that it can be chosen in the constructor of the class by assigning the gpu device number to gpu_id. E.g.,