[BUG]: cuda-core: attributes.ptx_version() returns .target field, not .version from ptx file
还没有人认领这个 Issue。
评估
调研方向
首先使用 test.ptx 运行提供的 main.py,并检查 cuda.core.experimental ObjectCode.from_ptx 和 kernel 属性的入口点,尤其是 ptx_version()。完成的标准是:对于此输入,ptx_version() 报告 PTX 的 .version 值 8.8,同时其他报告的属性保持其预期值。
由索引模型根据 Issue 内容生成。
描述
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 |
+-----------------------------------------------------------------------------------------+
- 主要语言
- Cython
- 星标
- 3.4k
- 派生
- 329
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 113
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/cuda-python 的其他 Issue
-
bug cuda.core
难度 2/5 1-3 小时 新手友好度 76/100
NVIDIA/cuda-python#2886 · 1 条评论 ·
-
triage
难度 1/5 1 小时以内 新手友好度 88/100
NVIDIA/cuda-python#2717 ·
-
triage
难度 1/5 1-3 小时 新手友好度 90/100
NVIDIA/cuda-python#2712 ·
-
triage
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/cuda-python#2646 · 1 个 reaction ·
-
cuda.core triage
难度 2/5 1-3 小时 新手友好度 62/100
NVIDIA/cuda-python#2435 · 1 条评论 ·
查看 NVIDIA/cuda-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
App Integration bug compiler Quest User Request
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100