Skip to content

Commit 1e19aa9

Browse files
grissom.wangclaude
andcommitted
docs(code-generator): add PTX ISA 9.3→9.4 delta summary
Distills the 31 additive features from the local release notes into a generation-oriented reference: new sm_107 targets, spcompress/ spdecompress, fabric/CFT instruction family, packed FP8/FP6/FP4 scalar add/sub/mul/fma, cvt.ue5m3x2 and MX scale qualifiers, TMA .multicast::cluster::32b, tcgen05 extensions, per-CTA global memory, plus a target-eligibility checklist (most additions are Blackwell+; a 13.3 toolchain rejects 9.4 features). Every claim and doc path verified against the local corpus; linked from cuda-code-generator SKILL.md and the PTX search guide. Co-Authored-By: Claude Code <noreply@anthropic.com>
1 parent 6894f7e commit 1e19aa9

4 files changed

Lines changed: 120 additions & 0 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ skills/
233233
cuda-code-generator/SKILL.md # Generates .cu files, must consult cuda-knowledge + cuda-samples
234234
references/
235235
cuda-optimization-strategies.md # Bottleneck → strategy mapping (Block Tiling, Vectorized Load, etc.)
236+
ptx-isa-9.4-delta.md # PTX ISA 9.3→9.4 changes (new instructions, packed FP math, tcgen05)
236237
ncu-rep-analyzer/SKILL.md # NCU profiling + bottleneck classification + optimization suggestions
237238
cuda-debugger/SKILL.md # Crash diagnosis: compute-sanitizer, cuda-gdb, cuobjdump
238239
kernel-benchmarker/SKILL.md # Compile, validate, benchmark via benchmark.py

‎skills/cuda-code-generator/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,6 @@ nvcc -O3 -arch=sm_89 -DKERNEL_PROFILE -o kernel_profile solution.cu
160160
## References
161161

162162
- Detailed explanations and code templates for optimization strategies → [cuda-optimization-strategies.md](references/cuda-optimization-strategies.md)
163+
- What PTX ISA 9.4 / CUDA 13.4 added over 9.3 (new instructions, packed FP8 math, TMA multicast, tcgen05 extensions) → [ptx-isa-9.4-delta.md](references/ptx-isa-9.4-delta.md) — consult before using inline PTX newer than the local toolkit guarantees
163164
- Concrete working code examples for each optimization pattern → [`../cuda-samples/references/`](../cuda-samples/references/) (curated NVIDIA official samples with code snippets, organized by topic; use [`../cuda-samples/SKILL.md`](../cuda-samples/SKILL.md) for the quick reference table and optimization mapping)
164165
- **MANDATORY REQUIREMENT: When dealing with complex APIs (such as cuBLASLt, Tensor Core, half precision \_\_half, etc.), you MUST first use `grep` or semantic search to consult: (1) the corresponding official API documentation under `../cuda-knowledge/references/` to ensure function signatures and data layout parameters strictly comply with NVIDIA official specifications; and (2) the relevant code patterns in `../cuda-samples/references/` to find working examples of the API in context.**
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# PTX ISA 9.3 → 9.4 Delta (CUDA 13.4)
2+
3+
What changed in PTX ISA 9.4, distilled for kernel generation decisions.
4+
Source of truth: `../cuda-knowledge/references/ptx-docs/13-release-notes/13.1-changes-in-ptx-isa-version-9.4.md`.
5+
Semantic changes vs 9.3: **none** — everything below is additive.
6+
7+
**Applicability before you generate**: most 9.4 additions target newer
8+
architectures. `tcgen05.*` needs Blackwell+ Tensor Core Gen5; `fabric.*`
9+
needs CFT-capable hardware; packed FP8/FP6/FP4 scalar math needs the
10+
target's support matrix. Always grep the linked local doc for the
11+
instruction's *Target ISA Notes* before emitting — never rely on this
12+
summary alone for arch eligibility.
13+
14+
## 1. New architectures
15+
16+
`sm_107`, `sm_107f` (family-specific), `sm_107a` (arch-specific) added
17+
as `.target` values. Details: `ptx-docs/11-directives/11.1.2-ptx-module-directives.target.md`.
18+
19+
## 2. New instruction families
20+
21+
| Family | Instructions | What it's for |
22+
|---|---|---|
23+
| Sparse compression | `spcompress`, `spdecompress` | compress/decompress sparse metadata+data in shared/global. Docs: `ptx-docs/9-instruction-set/9.7.10.30-data-movement-and-conversion-instructionsspcompress.md`, `...31-...spdecompress.md` |
24+
| Cache priority | `applypriority.async.bulk[.tensor]` | set eviction priority on bulk data. Doc: `9-instruction-set/9.7.10.17-*` … `9.7.10.19-*` |
25+
| Fabric (CFT) | `fabric.try_get/try_put/try_red.async.tensor`, `fabric.try_atom`, `createpolicy.range.fabric` | compute-fabric transport ops. Chapter: `ptx-docs/9-instruction-set/9.7.11-fabric-instructions.md` |
26+
27+
## 3. Scalar packed math (broad interest)
28+
29+
`add`, `sub`, `mul`, `fma` now accept `.f16x2` / `.bf16x2` / `.f32x2`
30+
and FP8/FP6/FP4 x4 packed types — 2-way/4-way SIMD arithmetic without
31+
tensor cores. Docs:
32+
`9-instruction-set/9.7.5.1-...add.md`, `9.7.5.2-...sub.md`,
33+
`9.7.5.3-...fma.md`, `9.7.5.4-...mul.md` (mixed-precision chapter).
34+
Pair with the new `cvt` types below for FP8 elementwise pipelines.
35+
36+
## 4. `cvt` conversions — new types and qualifiers
37+
38+
- `.ue5m3x2` destination type (pairs with `__nv_fp8_ue5m3` in
39+
cuda-math-docs — new UE5M3 format)
40+
- `.rz` rounding for `.e4m3x2`, `.e5m2x2`, `.e2m3x2`, `.e3m2x2`, `.e2m1x2`
41+
- `.pzo` qualifier (preserve-subnormal-to-zero behavior — check
42+
semantics in the cvt doc)
43+
- `.scaled::n1::ue8m0` for block-scaled conversion (MX formats)
44+
45+
Doc: `ptx-docs/9-instruction-set/9.7.10.24-data-movement-and-conversion-instructionscvt.md`
46+
47+
## 5. Comparison / selection
48+
49+
`set` gains `.u8x4`, `.s8x4`, `.u16x2`, `.s16x2` packed types.
50+
Docs: `9-instruction-set/9.7.7.1-*set.md`, `9.7.8.1-*set.md`.
51+
52+
## 6. mbarrier / TMA multicast
53+
54+
`.multicast::cluster::32b` qualifier added to `mbarrier.expect_tx`,
55+
`mbarrier.complete_tx`, `mbarrier.arrive`, `mbarrier.arrive_drop`,
56+
`cp.async.bulk`, `cp.async.bulk.tensor`, `tcgen05.commit` — 32-byte
57+
granularity cluster multicast for TMA loads.
58+
Doc: `9-instruction-set/9.7.15.16-...mbarrier.md` and the
59+
`cp.async.bulk` sections under `9.7.10.28-*`.
60+
61+
## 7. tcgen05 (Tensor Core Gen5) extensions
62+
63+
`.spcompress` on `tcgen05.ld[.red]`; `UE5M3` scale type and
64+
`.kind::ti16` on `tcgen05.mma[.sp|.ws|.ws.sp]`; `.exclusive` on
65+
`tcgen05.alloc/dealloc`; `.decompress::lut::b` and `.collector::b::*`
66+
on `tcgen05.mma`; `.sync_restrict::shared::read::mma::a` on
67+
`tcgen05.commit`. Chapter:
68+
`ptx-docs/9-instruction-set/9.7.18-tensorcore-5th-generation-family-instructions.md`.
69+
70+
## 8. Memory system
71+
72+
- `ld` gains `.proxy::readonly`; `prefetch` gains `.valid_addr` and
73+
`.L1::32B`; `cp.async.bulk.prefetch[.tensor]` gains
74+
`.level::eviction_priority`
75+
- `.override::global_address` / `.override_attribute` on
76+
`cp.async.bulk.tensor` / `cp.reduce.async.bulk.tensor` /
77+
`cp.async.bulk.prefetch.tensor`
78+
- `.im2col_no_offs::w` on `cp.async.bulk.tensor` /
79+
`cp.reduce.async.bulk.tensor` (see
80+
`5-state-spaces-types-and-variables/5.5.5-im2colwim2col_no_offswandim2colw128modes.md`)
81+
- `atom`, `red`, `cp.reduce.async.bulk`, `multimem.cp.reduce.async.bulk`
82+
gain `.noftz` with `.f32`
83+
- `ldmatrix` gains `.s8.s4` for `.m8n16`
84+
- `fence.proxy.async::generic` gains `.sync_restrict::shared::cluster::read`;
85+
`fence.proxy` gains `.acquire`/`.release` with `.alias`
86+
87+
## 9. Per-CTA global memory
88+
89+
New directive `.minperctamemory` plus special registers
90+
`%perctamemoryoffset`, `%perctamemorysize`. Docs:
91+
`ptx-docs/10-special-registers/10.34-special-registersperctamemoryoffset.md`,
92+
`10.35-...perctamemorysize.md`, `11-directives/11.4.10-*minperctamemory.md`.
93+
94+
## 10. Debug / source mapping
95+
96+
`.loc_intermediate` directive and `.nv_intermediate_source_section`
97+
construct for intermediate-IR source location mapping. Docs:
98+
`ptx-docs/11-directives/11.5.5-*loc_intermediate.md`, `11.5.6-*nv_intermediate_source_section.md`.
99+
100+
---
101+
102+
## Generation checklist
103+
104+
1. Is the feature arch-eligible for the requested `-arch`? Grep the
105+
instruction doc's *Target ISA Notes* (e.g.
106+
`grep -A3 "Target ISA Notes" ptx-docs/9-instruction-set/<file>`).
107+
2. FP8 elementwise: prefer `add/sub/mul/fma` packed forms + `cvt.ue5m3x2`
108+
over round-trips through f32 where the target allows.
109+
3. TMA multicast paths: `.multicast::cluster::32b` changes mbarrier
110+
transaction accounting — re-read
111+
`9-instruction-set/9.7.15.16-...mbarrier.md` before combining with
112+
`expect_tx`.
113+
4. Cross-check toolchain: nvcc must be CUDA 13.4+ to accept 9.4 features
114+
(a 13.3 toolchain rejects them; PTX 9.4 features also require
115+
sm_100a/sm_103a/sm_107-class targets for the Blackwell-specific
116+
groups above).

‎skills/cuda-knowledge/references/ptx-isa.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
**Complete PTX ISA 9.4 documentation is available locally at `ptx-docs/`**
2020

21+
> New in 9.4 vs 9.3 (sm_107, `spcompress`/`spdecompress`, fabric/CFT ops, packed FP8/FP6/FP4 `add/sub/mul/fma`, `cvt.ue5m3x2`, TMA `.multicast::cluster::32b`, tcgen05 extensions): see the delta summary in `../../cuda-code-generator/references/ptx-isa-9.4-delta.md` or the full notes at `ptx-docs/13-release-notes/13.1-changes-in-ptx-isa-version-9.4.md`.
22+
2123
The documentation has been converted to markdown with:
2224
- ✅ All tables, code blocks, and formatting preserved
2325
- ✅ 505 files organized by chapter

0 commit comments

Comments
 (0)