Third-party CI Warning "Falling back to prediction using DMatrix due to mismatched devices"
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Seeing the following warnings in [nightly CI]( https://github.com/rapidsai/cudf/actions/runs/13194559865/job/36833386337#step:10:19336 ):
```python
test_xgboost.py::test_predict[cuda]
/opt/conda/envs/test/lib/python3.12/site-packages/xgboost/core.py:158: UserWarning: [07:11:48] WARNING: /workspace/src/common/error_msg.cc:58: Falling back to prediction using DMatrix due to mismatched devices. This might lead to higher memory usage and slower performance. XGBoost is running on: cuda:0, while the input data is on: cpu.
Potential solutions:
- Use a data structure that matches the device ordinal in the booster.
- Set the device for booster before call to inplace_predict.
This warning will only be shown once.
warnings.warn(smsg, UserWarning)
test_xgboost.py::test_predict[cpu]
/opt/conda/envs/test/lib/python3.12/site-packages/xgboost/core.py:158: UserWarning: [07:11:48] WARNING: /workspace/src/common/error_msg.cc:58: Falling back to prediction using DMatrix due to mismatched devices. This might lead to higher memory usage and slower performance. XGBoost is running on: cpu, while the input data is on: cuda:0.
Potential solutions:
- Use a data structure that matches the device ordinal in the booster.
- Set the device for booster before call to inplace_predict.
This warning will only be shown once.
warnings.warn(smsg, UserWarning)
```
Note this CI job also fails. AFAICT it is due to these wanings being converted to errors, but please let me know if there is more going on
Contributor guide
Assessment
This issue has not been assessed yet.