Skip to content

ptx-shapes: the twelve sm_86 cc 12.1 entries the 9df9e7ce backend moved, at the GB10 scan's spill and JIT local - #845

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-ptx-shapes-sm86-cc121
Oct 26, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-ptx-shapes-sm86-cc121

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

GB10(cc 12.1)에서 sm_86 PTX를 JIT하는 ptx-shapes 표의 12행을 현재 main 트리의 측정값으로 다시 고정합니다.

What and why

BLOOMERY_ARCH=sm_86 just gate-ptx-spill fails on main with 12 violations on a GB10 card. The backend pin moved to 9df9e7cef561, the PTX of twelve generate_ds41 entries moved with it, and tools/ref/ptx-shapes/sm_86-cc12.1.tsv still held the earlier values.

This PR re-pins those twelve rows to the spill and JIT local that the scan reports now. Each changed row has a new PIN(2026-10-26): line above it; the earlier PIN lines stay. No other row changes and no band is relaxed. Of the twelve rows, hc_gated_up_mma_mix_4, hc_gated_up_mma_mix_4_bf16 and kq_gate_up_act_q4k_tiles dropped below their pins and the other nine rose above them.

Release notes: internal: the change is to a gate table, and no user-visible behavior moves.

Code shape

  • No second copy. One table file changes; no logic is added.
  • Model code holds only architecture facts. No model file changed.
  • Dead code is gone. Nothing was made unused.
  • No silent failure. No code changed.
  • Comments state what is true now. The new PIN(2026-10-26): lines give the old and new value, the toolchain and the card conditions.
  • No relaxed gate. Each row is set to the measured value, and every row carries a dated PIN(2026-10-26): line with its reason.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up. No Rust changed, so I did not run them.

Duplication found or removed (path:line), or "none": none found.

What I ran

Base 5b8619efc3066c720f7528c0401c2c4c648df9b5 (main), head cfb8934cf4a1e44636fb08b61031b8a1e4c4884c. The scan uses sm_86 PTX with ptxas 13.3.73, and the driver JITs it for cc 12.1.

Before, on the base:

  • BLOOMERY_ARCH=sm_86 just gate-ptx-spill: violations=12 FAIL for generate_ds41, violations=0 PASS for gate_qwen3vl_tower, rc 1.

The twelve rows. Base is the value pinned on main, and head is the value the scan measured and the PR pins (bytes; spill is the PTX spill, jit_local is the JIT's local memory):

Metric Base Head Difference
ds41_expert_gate_up_tiles jit_local 144 152 +8
gdn_conv_prep spill 0 8 +8
gqa_prefill_flash_g7_q8 jit_local 0 80 +80
hc_gated_up_mma_mix_4 spill 608 536 -72
hc_gated_up_mma_mix_4_bf16 spill 676 628 -48
kda_conv_prep spill 0 16 +16
kda_conv_prep_sp2 spill 0 16 +16
kq_gate_up_act_q4k_tiles jit_local 136 128 -8
mxfp8_gemv_ids spill 28 60 +32
q8_0_gemv_ids_mcol spill 0 16 +16
qwen3moe_router_norm_m jit_local 0 8 +8
qwen3moe_router_norm_m_prefetch jit_local 0 8 +8

After, on the head:

  • BLOOMERY_ARCH=sm_86 just gate-ptx-spill: generate_ds41 entries=458 pinned=458 violations=0 PASS, gate_qwen3vl_tower entries=26 pinned=26 violations=0 PASS, rc 0.

I ran no other gate. The change is a table of measured values, so there is nothing to compare for speed.

Hardware

NVIDIA GB10, 595.84

Card: NVIDIA GB10, 595.84, CUDA 13.3 (the CUDA version the scan's JIT reports). One DGX Spark. The scan builds generate_ds41 and gate_qwen3vl_tower for sm_86 and reads the spill and JIT local the cc 12.1 driver reports.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added the tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo label Oct 26, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: the twelve re-pinned rows match the values already on main in the cc 8.6 table, and each row has a dated PIN with the old value, the new value and the reason.

Checked

  • Duplicates: no code added; 12 rows and 9 PIN lines checked. The sm_86 spill column of the changed rows equals tools/ref/ptx-shapes.tsv on the base (for example gdn_conv_prep 8, kda_conv_prep 16, hc_gated_up_mma_mix_4 536, mxfp8_gemv_ids 60). tools/ref/ptx-shapes/sm_86-cc12.1.tsv says that column is the same as there, so the two tables agree after this change. Dryer and crapper did not run (no Rust changed).
  • Gates: 12 values moved, all with a PIN(2026-10-26): line. The pin move to 9df9e7cef561 is in the base Cargo.toml:12, and tools/ref/ptx-shapes/sm_121-cc12.1.tsv already carries the same reason, so the evidence that the old value was wrong holds. No gate or row removed, no band relaxed.
  • Silent failure: no code changed, 0 sites.
  • Tests: none added or changed. The gate is just gate-ptx-spill. Mutant: a row pinned at the wrong byte count. The scan reports a violation, so the gate turns red.
  • Performance: no hot path touched. The table records the compiler's output, and the PR body does not claim a speed change.
  • Escape catalog: no pattern matched (no shell code in the diff).

Notes

  • Four rows list jit_local on cc 12.1 and spill on sm_86 in one PIN line each. This is clear enough as written.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 01146f1 into midagedev:main Oct 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Tools, recipes, CI and the toolchain: tools/, justfile, .github/, Cargo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant