[BUG]: cuda-core: attributes.ptx_version() returns .target field, not .version from ptx file
Nessuno ha ancora preso questa issue.
- Lingua principale
- Cython
- Stelle
- 3.4k
- Fork
- 329
- Merge medio
- 1g 21h
- PR unite (30g)
- 113
Descrizione
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Something else
Component
cuda.core
Describe the bug
test.ptx
.version 8.8
.target sm_86
.address_size 64
.visible .entry test_kernel()
{
ret;
}
main.py
from cuda.core.experimental import Device, LaunchConfig, Program, ProgramOptions, launch, ObjectCode
dev = Device()
dev.set_current()
s = dev.create_stream()
mod = ObjectCode.from_ptx('test.ptx')
print(mod.get_kernel('test_kernel').attributes.num_regs())
print(mod.get_kernel('test_kernel').attributes.ptx_version())
print(mod.get_kernel('test_kernel').attributes.binary_version())
Prints
4
86
89
An aside, I am so excited for this library!
How to Reproduce
Run the above code
Expected behavior
I would expect ptx_version() to return the .version field from the ptx source.
Operating System
Ubuntu Linux 24.04
nvidia-smi output
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.51.03 Driver Version: 576.28 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 On | 00000000:01:00.0 On | Off |
| 0% 45C P3 72W / 450W | 2921MiB / 24564MiB | 1% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia eseguendo il main.py fornito con test.ptx e ispezionando gli entry point cuda.core.experimental ObjectCode.from_ptx e gli attributi di kernel, in particolare ptx_version(). Il lavoro è completato quando ptx_version() restituisce il valore PTX di .version, 8.8 per questo input, mentre gli altri attributi restituiti mantengono i valori previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- hpc
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 42/100