How to use GPU?

Can someone please tell me how to use GPU while training? For reference, I am attaching my code:

def objective(trial):
params = {
“objective”: “regression”,
“metric”: “score”,
“n_estimators”: 1000,
‘device’: ‘gpu’,
‘gpu_platform_id’: 0,
‘gpu_device_id’: 0,

This is not the full code. I was using optuna for hyperparameter tuning in my LGBM Regressor. I got an error in my submission “No OpenCL device found”. I am guessing it is certainly related with GPU.

You have to select it when you create a Run.