How to change to gpu_predictor in R?

What is the equivalent command for R: xgb_model.set_param({‘predictor’: ‘cpu_predictor’})?
This works for me with python. I have a cpu-trained model and need to predict using gpu and R.

This does not work for R: predict(xgb_model,dtest,predictor=“gpu_predictor”)
I’m using xgboost_1.3.0.1, Win10 64x, R3.6.3

You can use xgb.parameters<-:

xgb.parameters(xgb_model) <- list(predictor = 'gpu_predictor')
1 Like

It works! Thank you.