rapidsai / rapidsai/rapids-cli

Migrate NvmlGpuInfo from pynvml to cuda.core.system after 1.0 release

Open
#147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Context

PR #137 introduced NvmlGpuInfo in hardware.py which wraps raw pynvml calls behind a GpuInfoProvider Protocol. Reviewers (@ncclementi, @mdboom) noted we should migrate from pynvml to cuda.core.system for consistency with the rest of the CUDA Python ecosystem.

As of recently, cuda.core.system has all the APIs needed (device count, compute capability, memory info, driver version). However, this requires waiting for the cuda-core 1.0 release before merging.

Related

  • #146 — draft PR by @mdboom migrating pynvml to cuda.core.system (blocked on cuda-core 1.0 release)
  • #145 — cuda-bindings dependency issue
  • #137 — DI refactor that introduced the GpuInfoProvider abstraction

Work needed

Once cuda-core 1.0 is released:

  1. Update NvmlGpuInfo in rapids_cli/hardware.py to use cuda.core.system instead of pynvml
  2. Update HardwareInfoError wrapping to catch cuda.core exceptions instead of pynvml.NVMLError
  3. Remove nvidia-ml-py (pynvml) from dependencies.yaml if fully replaced
  4. Update tests in test_hardware.py to mock cuda.core instead of pynvml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

After cuda-core 1.0 is released, start in rapids_cli/hardware.py by reading NvmlGpuInfo and its HardwareInfoError handling. Update the mocks and coverage in test_hardware.py, then check dependencies.yaml for the nvidia-ml-py entry. Done means cuda.core.system replaces pynvml consistently and the hardware tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.