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 )
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.,
xgb.XGBClassifier(tree_method='gpu_hist',predictor='gpu_predictor',gpu_id=1)