8.4 Checking the GPU environment
Driver and CUDA version conflicts, nvidia-smi and CUDA_VISIBLE_DEVICES.
Key points
The NVIDIA driver supports up to a certain CUDA version. Packages built for a newer CUDA need a new enough driver. CUDA means NVIDIA's parallel computing platform.
What NVIDIA says (2)
“You will have to ensure the CUDA driver on your machine supports the CUDA version you are trying to install with conda.”
“If conda has incorrectly identified the CUDA driver, you can override by setting the CONDA_OVERRIDE_CUDA environment variable.”
nvidia-smi is NVIDIA's command-line utility for GPU monitoring and management. Run it first when checking a GPU environment.
What NVIDIA says (1)
“nvidia-smi (also NVSMI) provides monitoring and management capabilities for each of NVIDIA's Tesla, Quadro, GRID and GeForce devices”
CUDA_VISIBLE_DEVICES is an environment variable that controls which GPUs a program can see. The visible GPUs are renumbered from 0 inside the program.
What NVIDIA says (1)
“To specify a device to run on, we recommend using the CUDA_VISIBLE_DEVICES ( doc ) environment variable.”
Key terms
- CUDA_VISIBLE_DEVICES: An environment variable that sets which GPUs a program can see.
- nvidia-smi: A command-line tool that lists NVIDIA GPUs and reports their status and use.
- CUDA driver: The NVIDIA system software that lets programs use the GPU; it must support the CUDA version your packages need.
Sample question
Conda reports a '__cuda constraint conflict' while installing RAPIDS. What does it mean?
Show the answer
Answer: The machine's CUDA driver does not support the CUDA version you are installing
The NVIDIA driver supports up to a certain CUDA version. Packages built for a newer CUDA need a new enough driver. CUDA means NVIDIA's parallel computing platform.
What NVIDIA says (2)
“You will have to ensure the CUDA driver on your machine supports the CUDA version you are trying to install with conda.”
“If conda has incorrectly identified the CUDA driver, you can override by setting the CONDA_OVERRIDE_CUDA environment variable.”
Practice 8.4 (3 questions) Full Software and Environment Management guide
← 8.3 Dependencies and team collaboration · 8.5 Git basics →