|
| 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). |
0 commit comments