8.4 Checking the GPU environment

NCA-ADS · Software and Environment Management (6% of the exam) · Official objective: “Performing GPU environment check (driver/CUDA/RAPIDS compatibility, nvidia-smi, device visibility) and resolving a dependency conflict”

Driver and CUDA version conflicts, nvidia-smi and CUDA_VISIBLE_DEVICES.

Key points

  1. 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.”

    — NVIDIA CUDA-X Data Science: Installation guide

    “If conda has incorrectly identified the CUDA driver, you can override by setting the CONDA_OVERRIDE_CUDA environment variable.”

    — NVIDIA CUDA-X Data Science: Installation guide

  2. 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”

    — nvidia-smi documentation

  3. 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.”

    — cuML: Advanced usage (device selection)

Key terms

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.”

— NVIDIA CUDA-X Data Science: Installation guide

“If conda has incorrectly identified the CUDA driver, you can override by setting the CONDA_OVERRIDE_CUDA environment variable.”

— NVIDIA CUDA-X Data Science: Installation guide

Practice 8.4 (3 questions) Full Software and Environment Management guide

← 8.3 Dependencies and team collaboration · 8.5 Git basics →