Anaconda Xgboost unable to find GPU

Question:

It seems that Anaconda is unable recognise my GPU,
GPU is RTX2070 (Driver version 510.47.03),
system Ubuntu 20.04,
cudatoolkit 11.3.1,
cudnn 8.2.1,
XGboost 1.5.2 via pip install.

When I run XGboost with GPU enable it shows:

XGBoostError: [01:24:12] ../src/gbm/gbtree.cc:531: Check failed: common::AllVisibleGPUs() >= 1 (0 vs. 1) : No visible GPU is found for XGBoost.

I also used GPUtil to check the visible GPU, it is showing 0 GPU.

Below is the output from nvidia-smi

enter image description here

Can anyone help? how come the GPU in the system is no visible to any package in anaconda? (Pytorch, XGBoost etc.)

Asked By: tgtm005

||

Answers:

Appeared to be a driver issue, tried the same code in another computer with two RTX 3090 and got no issue

Answered By: tgtm005

This error is raised by XGBoost when a mismatched (typically newer) CUDA Toolkit is installed in a system with older display driver libraries (build for an older CUDA version).

One needs to synchronize CUDA versions between the driver libraries (on the host) and CUDA Toolkit (in the container), by either of two things:

  • upgrade the host driver libraries (preferred),
  • downgrade the container CUDA Toolkit.

Here’s my scenario when I encountered this error: link.

Answered By: mirekphd
Categories: questions Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.