fix(gpu): parse legacy PTX body parameters

PTX 1.0 through 1.3 declares kernel parameters inside the entry body. Keep later-version parameter-list parsing unchanged.

Fixes #6594
This commit is contained in:
morluto
2026-10-23 18:00:19 +08:00
parent f250c8cca5
commit 6442329717
3 changed files with 152 additions and 24 deletions
+3 -2
View File
@@ -81,8 +81,9 @@ Kernel representations have different meanings:
- PTX reports parameter declarations and virtual registers. Shared bytes cover
supported static declarations inside that entry; they do not establish module
shared memory, dynamic allocation or physical device resources.
A `.target compute_xx` spelling is retained as written; NVIDIA PTX defines it
as a synonym for `.target sm_xx`.
PTX 1.0–1.3 declares entry parameters in the body; PTX 1.4 and later uses the
entry parameter list. A `.target compute_xx` spelling is retained as written;
NVIDIA PTX defines it as a synonym for `.target sm_xx`.
Scalar register declarations count each bare or percent-prefixed name and
each parameterized range. Unsupported declaration forms or overflowing totals
retain an unknown count and partial decoding coverage. Unsupported parameter