Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

hip-python-as-cuda: add the cuda-python 12+ cuda.bindings module layout

Aperta
#109 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, release

Direzione di ricerca

Start by inspecting the existing cuda.cuda and cuda.cudart modules and their aliasing approach. Add the cuda.bindings package with driver, runtime, and nvrtc submodules, then verify the documented imports and supported managed-memory and graph calls against the hip-python wheel. Also check the PyPI, Test PyPI, or source-build path so the compatibility package is installable alongside hip-python.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The CUDA interoperability package currently mirrors the legacy cuda-python layout: from cuda import cuda, from cuda import cudart, from cuda import nvrtc. cuda-python 12.0 restructured its bindings into cuda.bindings.driver, cuda.bindings.runtime, and cuda.bindings.nvrtc, and downstream consumers have moved to that layout.

Concrete consumer: PyTorch imports from cuda.bindings import driver, runtime in several places (torch/cuda/_utils.py, torch/cuda/graphs.py for graph introspection and debug-dot dumps, torch/cuda/memory.py for a managed-memory allocator, torch/cuda/_graph_annotations.py). On ROCm builds, PyTorch currently reports cuda.bindings as unavailable, because NVIDIA's package installs and imports fine on a ROCm box but fails at the first call. If hip-python-as-cuda provided a working cuda.bindings layout, PyTorch could switch that platform gate to a functional probe and light these features up on ROCm.

What would work immediately through such a layout, verified with the hip-python 7.2.2 wheel against a HIP 7.15 runtime on gfx950: managed memory (hipMallocManaged, hipMemAdvise, hipFree, which is all PyTorch's UVM allocator needs), graph topology introspection (hipGraphGetNodes/GetEdges/NodeGetType/KernelNodeGetParams), and hipGraphDebugDotPrint. Some PyTorch features additionally need HIP APIs that do not exist yet (hipGraphNodeGetToolsId, hipGraphGetId/hipGraphExecGetId, hipFuncGetName); those are separate HIP runtime asks and not blockers for the layout itself.

Asks:

  1. Add a cuda.bindings package (with driver, runtime, nvrtc submodules) to hip-python-as-cuda, using the same aliasing approach as the existing cuda.cuda/cuda.cudart modules. The call/return convention ((err, *outs) tuples) already matches cuda-python, so this is primarily a module-layout addition.
  2. Publish hip-python-as-cuda wheels to PyPI alongside hip-python, or document the Test PyPI/source-build path prominently; the layout only helps consumers when the package is installable the way cuda-python is.

This issue was drafted with the help of an AI assistant (Claude); the compatibility claims were verified by hand against the hip-python 7.2.2 wheel.

Lingua principale
Cython
Stelle
40
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ROCm/hip-python

Tutte le issue di ROCm/hip-python

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.