Skip to content

glm cuda: decode kernels as dependent launches (carries #3673), +3.7% decode at TP=3, same tokens - #3776

Merged
ashhart merged 22 commits into
ashhart:mainfrom
ultradaoto:glm-decode-pdl-carry
Nov 19, 2026
Merged

ashhart merged 22 commits into
ashhart:mainfrom
ultradaoto:glm-decode-pdl-carry

Conversation

@ultradaoto

@ultradaoto ultradaoto commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This carries @laudney's #3673 onto current main, with their agreement (#3673 (comment) and the reply under it). The first 17 commits are theirs, unchanged in content and authorship; I only moved them from main 3f1290ffe7 to main af9777b (no conflicts) and reran the guards and a TP=3 receipt on the new head. Two commits of mine follow: the CHANGELOG line, and a seven-line fix in kda.zig for the prompt time. The design is theirs and #3673's description is the place to read it in full.

TP=3 on 3 × GB10, same checkpoint and settings main af9777b this branch this branch, TF_GLM_PDL=0
16 varied greedy requests one at a time, aggregate tok/s 58.97 / 58.45 60.92 / 60.85 (+3.7%) 57.63
tools/bench_openai.py, code, median tok/s 62.78 / 62.46 65.01 / 65.05 (+3.8%) 61.36
the same, chat with thinking off 50.11 / 49.60 52.03 / 51.89 (+4.2%) 49.05
Four 512-token greedy decodes at once, aggregate tok/s 86.4 / 84.9 87.2 / 88.7 85.8
Cold 7.2K / 28.8K prompt, first token (s) 4.70 / 17.65 4.70 / 17.68 with the last commit (4.74 / 17.88 before it) 4.69 / 17.64
Tokens equal in every start

At TP=3 the 17 carried commits measured long cold prompts about 1% slower than main (#3673 measured them 0.7 to 0.9% faster at TP=2). The cause is KDA's three-kernel chain launched dependent in prompt chunks; the last commit here, f5baf0e14, launches that chain plain from 64 rows and brings the prompts back to main's time with decode unchanged. The comments below have the isolation and the before and after.

What this changes

As #3673: GLM's CUDA kernels and qmmf's decode linears launch as programmatic dependent launches. The next kernel launches while the current one ends and waits (griddepcontrol.wait) before it reads anything, so a decode token's kernels lose most of their launch gaps. Every GLM kernel opens with glm_pdl::enter(); qmmf's decode tile loads its weights and scales before the wait and its input rows after it. TF_GLM_PDL=0 launches them all plain. Experts, the router plan and the RoCE exchange stay plain launches. Three guards keep a read from moving above the wait: test-glm-pdl-scan, tf-cuda-test glm-pdl-order and zig build check-pdl-loads -Dnvcc=….

Checks on this head

  • Head commit: f5baf0e14d on main af9777b; it merges without conflict into main 8cbef9777b. It is df0a2a2614 (the last of glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's commits, and the head every check and number in this description was taken on unless it names another), then the CHANGELOG commit, then f5baf0e14 (the KDA fix; its own checks and numbers are in my comment below).
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 221 and 221, 0 new findings.
  • Tests run, with the command and pass, fail and skip counts:
    • zig build test-cuda-host: 7,116 of 7,150 passed, 33 skipped, 1 failed (cli_config_test, "serve --config: expand reads the file …"). The same command on main af9777b on this box: 7,114 of 7,148 passed, 33 skipped, and the same 1 test failed, so it is not this change.
    • zig build test-kernel-contract: exit 0. zig build -Dfixed-cpu test-gradient-serving test-glm-index-emulate test-glm-logprobs-host: exit 0.
    • zig build test-glm-pdl-scan: passes. python3 tools/test_pdl_early_loads.py: 17 OK.
    • zig build check-pdl-loads -Dnvcc=/usr/local/cuda-13.0/bin/nvcc: 0 early read(s) in 201 function(s) of 9 image(s).
    • tf-cuda-test glm-pdl-order on one GB10: 17 PASS, 0 FAIL; the control reads a read before the wait saw the poison (try 2) and wrote the wrong value, as planted.
    • zig fmt --check build.zig zig: clean. python3 tools/zig/cuda_common_check.py: 0 violations. python3 tools/pr_check.py --base origin/main --pr 3776 on dd2a74bff5: 0 errors, 0 warnings.
    • git diff --check: two lines with trailing whitespace in docs/receipts/glm-decode-pdl-60e67379/contract/sass-early-loads.txt, a captured tool output in glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's receipt. Left as it is; say if you want it trimmed.
  • CI: not run yet on this head.
  • Not run, and why: atc overlap (tool not installed); TP=1 and TP=2 on this head (the three boxes were used as one TP=3 set; glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's receipt is TP=2 on its own head); nvcc 13.2 to 13.5 (these boxes have 13.0 only, so I could not check the nvcc 13.3 records the branch carries); chips other than GB10; a soak on this head.

Receipt

  • Main against branch: the table above. Three GB10s on a switchless triangle (NCCL carries every gather), main af9777b and head df0a2a2614 built on these boxes the same way. Starts in one session in this order: main, branch, branch with TF_GLM_PDL=0, branch, main; one number a start. Then four profile starts and four cold-prompt starts, each in the order main, branch, branch, main.

  • Boxes it reaches: GLM-5.3-Flash on CUDA, every TP.

  • New switch? Default, accepted values, profile row: as glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673, TF_GLM_PDL, on by default, 0 launches plain; registered in platform/environment.zig and docs/environment.md.

  • Environment: Zig 0.17.0, nvcc 13.0 (cuda_13.0.r13.0/compiler.36424714_0), driver 580.159.03, Ubuntu 24.04.4, kernel 6.17.0-1018-nvidia, 3 × DGX Spark (GB10). GLM-5.3-Flash-Uncensored EXL3 at revision 07135ec082f8, --parallel 4 --kv-cache fp8 --reasoning-effort high --decode-share 0.5, --drafter incoai/GLM-5.3-Flash-DFlash2 at 6cc6c481, TF_GLM_CLEAR_THINKING=1 TF_GLM_REQUEST_STARTS=1 TF_GLM_DENSE_BITS=8 TF_GLM_HEAD_BITS=8 TF_GLM_KDA_PAD=1 TF_ROCE=1, greedy.

  • Paths and platforms the change reaches, which I ran and which I could not: ran TP=3 drafted decode at one and four streams, cold prompts to 28.8K tokens, one 1440 × 900 image a start. Could not run TP=1 and TP=2, other chips, other nvcc versions.

  • Exactness: 13 greedy replies (8 prompts alone, 4 at once, one prompt of about 8K tokens) hash the same in all 13 starts of this receipt, with the switch on and off. tools/bench_concurrent.py --alone --serial reported 0 failed and 0 unmeasured in each of the five timing starts.

  • Decode speed before and after, from tools/bench_openai.py --tokens 256 --reps 3 --temperatures 0: the table's rows 2 and 3. tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0 --levels 1,4 --alone --serial:

    main branch TF_GLM_PDL=0
    1 stream, code, tok/s 62.8 / 62.3 65.1 / 64.6 61.2
    1 stream, chat 50.2 / 49.5 51.5 / 51.5 49.1
    4 streams, code, aggregate 129.0 / 122.1 125.9 / 131.9 127.7
    4 streams, chat, aggregate 110.3 / 102.7 104.5 / 113.8 109.3

    Four streams show no clear gain here: the two starts of one build differ by more than the builds do. The tokens a round over the 16 requests are 3.058 in every start.

  • Prompt speed before and after: not from tools/bench_cache.py; I used a script that sends two prompts of new text at each size to a fresh start and reads the first token's time. Seconds, two requests a start, starts in the order main, branch, branch, main:

    prompt tokens main branch branch main
    1.0K 0.75, 0.75 0.75, 0.75 0.75, 0.76 0.75, 0.75
    7.2K 4.70, 4.69 4.74, 4.75 4.74, 4.74 4.70, 4.72
    28.8K 17.61, 17.68 17.80, 17.89 17.89, 17.95 17.64, 17.69

    So about 1% slower on long cold prompts at TP=3 on df0a2a2614, the same in both branch starts; f5baf0e14 removes it (17.70, 17.73 and 17.61, 17.68 s at 28.8K, in the comment below). The first 1440 × 900 image of a start took 2.91 and 2.90 s on main and 2.88 and 2.87 s on the branch.

  • Where the decode time went: TF_GLM_PROF=1 with MTP drafts (--mtp-confidence 0.5), the 4-row verify calls, mean ms a call on rank 0, starts in the order main, branch, branch, main:

    rank 0, ms a call main branch branch main
    wall 47.48 45.92 45.70 47.60
    kda 9.61 9.25 9.19 9.60
    mla 4.38 4.06 4.00 4.42
    shared 2.91 2.45 2.44 2.90
    router 1.82 1.36 1.34 1.84
    dense 0.81 0.78 0.77 0.82
    head 1.01 1.02 1.02 1.00
    routed 22.98 23.07 23.09 23.15
    gathers (both) 3.89 3.86 3.77 3.77

    Ranks 1 and 2 move the same way (wall 47.41 / 47.51 to 45.84 / 45.59 on rank 1, 47.39 / 47.50 to 45.84 / 45.58 on rank 2).

  • Licence of any new weights or drafter: n/a.

Kernel contract, only when a GPU kernel is new or changed
  • Kernels registered with the contract, and the kernel each one replaces: as glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673, no kernel is new; the GLM kernels and qmmf's decode tiles gain the entry wait, and their records are updated in glm_cuda_records.zig, lane_half_records.zig, modelopt_lane_records.zig, nvcc_133_records.zig and registry.zig.
  • A planted control for each new kernel, and each one fails as planted: glm-pdl-order's planted early read fails as planted (above).
  • Each backend's SUMMARY line and exit status: CUDA on GB10 with nvcc 13.0, exit 1: SUMMARY 661 kernels: 661 pass gates 1-4, 0 fail, 8 known findings; 422 controls: 422 red as planted, 0 missed; 186 limit problems. All 186 limit problems read no compiled usage recorded (183 in the table check, and 3 of the same kernels in the live check). They are on 43 records in the flashnext_mtp, exl3_experts, nvfp4_experts_tile, qwen35 and qwen4 images; none is a GLM or qmmf record, and each record's line is the same text on main af9777b as on this head. I did not run the full contract on main to confirm it prints the same 186.
  • Chips I could not run: everything but GB10 (sm_121).

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (Passing after: yes, above. Failing before: glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's work, I did not repeat it.)
  • Comments and docstrings are one line. No measurements or history in the source. (glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's text, unchanged; pr_check reports no errors.)
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines. (Nothing added to glm cuda: decode kernels as dependent launches, +6.8% decode at TP=2, same tokens #3673's commits.)
  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off.
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Concurrent equals solo and the 13 hashes: measured. I did not run a "draft": false comparison on this head.)
  • No precision traded for speed. The tokens are the same with the switch on and off.
  • Decode and prompt processing are no slower than main at one stream and the widest admitted. (Decode: faster at one stream, level at four. Long cold prompts: level with main with f5baf0e14, about 1% slower before it.)

@ultradaoto

Copy link
Copy Markdown
Contributor Author

The slower cold prompts are the dependent launches themselves. Three more cold-prompt starts of this branch, same settings, in the order TF_GLM_PDL=0, default, TF_GLM_PDL=0 (first token, seconds, two requests a start):

prompt tokens TF_GLM_PDL=0 default TF_GLM_PDL=0
7.2K 4.68, 4.68 4.72, 4.72 4.70, 4.70
28.8K 17.59, 17.63 17.82, 17.86 17.65, 17.68

With the switch off the branch is at main's 17.61 to 17.69 s; with it on, all three starts so far are at 17.80 to 17.95 s. So at TP=3 the launches gain 3.7% in decode and cost about 1.2% on a long cold prompt. The 13 reply hashes are the same in these starts too.

Next I will look at keeping the prompt passes' launches plain and measure that.

@ultradaoto

Copy link
Copy Markdown
Contributor Author

The cold-prompt cost is KDA's three-kernel chain in prompt chunks, and one small commit removes it: f5baf0e14 ("fix(glm): a prompt chunk's KDA chain launches plain"), now on this branch.

How I found it. Lab builds of this branch (not pushed) that launch one group of kernels plain during prompt passes only, each with two requests at 28.8K new prompt tokens a start, first token in seconds. Main is 17.61 to 17.69 s and this branch as first posted 17.80 to 17.95 s.

launched plain in prompt passes start 1 start 2
every GLM launch 17.57, 17.61 17.62, 17.69
the glue kernels (cuda_pdl.launch's sites) 17.84, 17.84 17.74, 17.80
KDA (kda.zig's launches) 17.62, 17.67 17.69, 17.69
the qmmf lane's reduce 17.85, 17.85 17.88, 17.92
glm_mm (dependent on main already) 17.92, 17.98 17.97, 18.03

A different cut, launching plain every grid of more than 256 or more than 1,024 blocks whatever the pass, did not help (17.83 to 17.96 s). So it is not the size of the grids; it is KDA in a prompt chunk. I did not establish why a dependent launch costs there. glm_mm's row says its dependent launches help prompts, as main has them.

The fix. kda.chain uses its three kernels (prep, step, out) from wide_rows (64) rows, which is what a prompt chunk is, and the fused kernel or a short three-kernel chain for decode windows. The commit launches the three kernels dependent only below wide_rows rows. Nothing else changes: the kernels still open with glm_pdl::enter(), and a plain launch of them is the path TF_GLM_PDL=0 already takes.

Measured, same three GB10s and settings as the description, starts in the order fix, branch before the fix, fix, branch before the fix:

before the fix with the fix
Cold 28.8K prompt, first token (s) 17.80, 17.87 / 17.84, 17.93 17.70, 17.73 / 17.61, 17.68
Cold 7.2K prompt, first token (s) 4.73, 4.74 / 4.73, 4.75 4.70, 4.72 / 4.68, 4.68
16 varied greedy requests one at a time, tok/s 60.75 / 60.86 61.23 / 61.20
tools/bench_openai.py, code, median tok/s 65.12 / 64.88 65.48 / 65.65
the same, chat with thinking off 51.91 / 52.00 52.30 / 52.22

The 13 reply hashes are the same in all four starts and equal main's. With the fix the long cold prompts are at main's time (17.61 to 17.69 s and 4.69 to 4.72 s in the description's starts) and decode keeps its gain.

Checks on f5baf0e14: zig build check-pdl-loads -Dnvcc=… with nvcc 13.0: 0 early read(s) in 201 function(s) of 9 image(s); test-glm-pdl-scan passes; tools/test_pdl_early_loads.py OK; tf-cuda-test glm-pdl-order on one GB10: 17 PASS, 0 FAIL, the control red as planted; test-kernel-contract exit 0; zig fmt --check clean; lean 221 against 221; cuda_common_check 0 violations; pr_check --pr 3776 0 errors, 0 warnings. test-cuda-host: 416 of 418 steps succeeded and 1 failed, the same cli_config_test that fails on main; its summary counts 5,550 of 5,583 tests passed and 32 skipped, fewer than the first run's 7,150, which I take to be the steps that came from the build cache.

I have updated the description's head commit, its cold-prompt row and its checklist to match.

@ultradaoto

Copy link
Copy Markdown
Contributor Author

Rebased onto main e3fb56cb09 (the old base was af9777b494). The head is now 4b0e298de7: the same 19 commits, laudney's 17 under their authorship.

What the rebase touched

  • zig/src/core/contract/registry.zig: main's new record "prompt16 FP4 lean SwiGLU pair" is kept; the two qmmf 16-row tile records take this branch's text.
  • zig/tests/cuda/main.zig: main inlined the glm-mm-fixed import to stay at 600 lines and this branch adds the glm-pdl-order command. With both the file was 601 lines, so glm_mm_bench is imported inline too (600).
  • zig/tests/fixtures/gradient-serving.tsv: probe.cu's row from this branch, prompt16.cu's row from main.
  • CHANGELOG.md: the entry is under Unreleased (the merge had left it in the 1.2.10 section).

Over zig/kernels/cuda, zig/src/families/glm and zig/src/cuda, the diff from the old head to the new one is only what main changed there.

Checks on 4b0e298de7 (one GB10)

  • zig fmt --check; tools/pr_check.py --base origin/main --pr 3776: 0 errors, 0 warnings (lean 221 vs 221 on main).
  • cuda_common_check.py 0 violations, cuda_fragment_check.py 0 misses, tools/test_pdl_early_loads.py 17 tests OK.
  • zig build -Dfixed-cpu test-gradient-serving test-qwen-serving-host test-glm-pdl-scan test-glm-index-emulate test-glm-logprobs-host: pass.
  • zig build test-kernel-contract and test-kernel-symbols-host: pass.
  • zig build fatbins kernel-contract-fatbins -Dsm=80,86,89,120,121 builds; check-pdl-loads on the same targets: 0 early reads in 402 functions of 9 images.
  • zig build test-cuda-host: 7,265 of 7,299 passed, 33 skipped, 1 failed. The failure is cli_config_test ("serve --config: expand reads the file, …"), the test that also fails on this machine on main af9777b; I did not re-run main's suite today.
  • On the device: tf-cuda-test glm-pdl-order 17 PASS, 0 FAIL, with the planted early reader red as planted.

Timing again, 3 x GB10 at TP=3, main e3fb56cb09 against this head

Starts in the order main, PR, PR, main, with the settings of the first receipt (DFlash2 drafter, fp8 KV cache, 8-bit dense and head linears, TF_GLM_KDA_PAD=1).

main main PR PR
16 requests one at a time, tok/s 58.86 58.40 61.04 61.05
bench_openai code, tok/s 62.55 61.30 65.03 65.34
bench_openai chat, tok/s 49.98 49.64 51.90 52.24
cold 7.2K-token prompt, first token, s 4.75, 4.75 4.72, 4.75 4.72, 4.73 4.74, 4.75
cold 28.8K-token prompt, first token, s 17.79, 17.80 17.78, 17.79 17.75, 17.73 17.80, 17.83
bench_concurrent code, 4 streams, tok/s 129.8 119.0 130.6 133.4
bench_concurrent chat, 4 streams, tok/s 110.7 102.3 113.5 113.5
  • One stream: +4.1% on the 16 requests, +5.3% on bench_openai code, +4.5% on chat.
  • Cold prompts: no difference now. The roughly 1% cost in the first receipt is gone with the KDA commit.
  • Four streams: the two main starts differ from each other by more than the PR differs from the better one, so I claim nothing there.
  • 13 fixed prompts at temperature 0 give identical output hashes in all four starts.

Not re-run on this head: the device kernel-contract, a TF_GLM_PDL=0 start and the profiles. These numbers are not added to the tree; the receipt under docs/receipts is still the original 2 x GB10 run.

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thank you @ultradaoto. The isolation of the cold-prompt cost to KDA's three-kernel chain in prompt chunks, and the small fix that launches that chain plain from 64 rows while keeping the decode gain and the same token hashes, reads clearly.

We will run a device check on our side on the GB10 class with GLM-5.3-Flash, comparing token hashes to main and to TF_GLM_PDL=0 and checking the aggregate decode and 28.8K cold-prompt timings. One small thing from you: please trim the two trailing-whitespace lines in the captured receipt. We have started CI on this head.

  • Synthena

@ultradaoto

Copy link
Copy Markdown
Contributor Author

Done: the two trailing-whitespace lines in docs/receipts/glm-decode-pdl-60e67379/contract/sass-early-loads.txt (lines 2 and 18) are trimmed in 7175e8d757, and the file's row in that receipt's SHA256SUMS carries the new hash. git diff --check against main is clean now.

Main had moved, so the branch is also rebased onto a1781885e9; only CHANGELOG.md conflicted. Head 7175e8d757, 20 commits.

On this head so far: zig fmt --check, tools/pr_check.py --base origin/main --pr 3776 (0 errors, 0 warnings) and tools/test_pdl_early_loads.py. The build-based checks (fatbins with check-pdl-loads, test-kernel-contract, test-cuda-host) and the device order test last ran on 4b0e298de7; I will rerun the no-GPU ones on this head and say so here only if anything differs.

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thank you @ultradaoto. Thanks for trimming the two trailing-whitespace receipt lines, updating the checksum row and rebasing onto current main; that closes the one code point we raised. We will run our own GB10 check with GLM-5.3-Flash, comparing token hashes to main and to TF_GLM_PDL=0 and checking the aggregate decode and 28.8K cold-prompt timings.

One thing to confirm from your side: please post the green CI result on the current head, since the earlier build and device checks ran on the previous head. Nothing else is needed from you.

  • Synthena

laudney and others added 14 commits November 19, 2026 22:11
A GLM-5.3-Flash decode step spends 2-3 us idle between each of its
~1,320 kernels. Every GLM kernel now opens with glm_pdl::enter()
(launch_dependents, then griddepcontrol.wait; weight writers wait
without the early trigger, since glm_mm reads weights first), so
each GLM launch may be a dependent one: cuda_pdl.launch makes it so
under TF_GLM_PDL, which already governed glm_mm, and the shared KDA
launcher takes an opt-in flag. test-glm-pdl-scan, now in the no-GPU
workflow, fails any GLM kernel body that does not open with the
wait; fake test drivers forward cuLaunchKernelEx. Same arithmetic,
so every output keeps its bits.
GLM's decode spends a launch gap before each of its ~192 qmmf linears
a token, and the PoC measured 1.3% more decode speed from making them
dependent. qmmf_kernel now triggers its dependents at entry and,
under TF_QMMF_WFIRST, loads its prologue stages' weights before
griddepcontrol.wait and the input rows after it; reduce_kernel waits
first. Lane.pdl (false by default, set only by GLM from TF_GLM_PDL)
makes the decode entries and the reduce dependent; prompt entries
stay plain. Same arithmetic and bits; the register records the
prologue moved are re-measured for nvcc 13.0 and 13.3.
With every GLM kernel opening on glm_pdl::enter(), nvcc 13.3 gives
tf_glm_chunks_16 and tf_glm_chunks_32 other registers on sm_120 and
sm_121, and df_sumn 40 on both (main's 13.3 build was already off
its record there). The 13.3 set records the five-SM measurement of
each, so the 13.3 limits audit has no new stale GLM entry; nvcc
13.0's records, which CI checks, did not move.
tf-cuda-test glm-pdl-order runs each kernel behind a slow writer that
lets it in at once: one kernel from every GLM image, glm_mm's reduce
and qmmf's decode row with K slices, a cluster and one K group,
through the production launchers. Each must give the bytes of a
plain launch and, with main's fatbins from the same nvcc, main's
bytes; a planted early reader must see the poison and go wrong, and
chains through another stream's events and host copies must hold.
On GB10 every case passes and the control goes red as planted.
The lean checker reads a C block comment's opening and closing marks
even inside Zig strings, and cuda_vision.zig crossed 600 lines with
the lanes' new pdl field. The scan test spells those marks from two
parts, and the vision tests build their lanes as struct literals so
the field defaults apply, which also drops the explicit pdl lines.
With GLM's kernels launched dependent, greedy replies after a cold
8k prompt varied (8 distinct 16-token replies in 30). ptxas placed
the non-coherent loads that nvcc emits for const __restrict__
inputs above griddepcontrol.wait in 12 kernels (the DSA selectors,
dsa_tokens, the KV-host kernels, df_attn), so a selector could read
a position or a score before the kernel writing it finished. Those
inputs drop __restrict__, which makes their loads coherent and keeps
them after the wait; 60 of 60 replies now match. Records of the
kernels whose registers moved are re-measured.
The source scan cannot see what ptxas schedules. check-pdl-loads,
with -Dnvcc, disassembles the GLM images and qmmf and fails any
sm_90 or later function that reads global memory before its
griddepcontrol.wait, or never waits unless it is a plain-only entry;
only the weight-first bodies may start async weight copies first.
The scan test now also checks that glm_mm's and qmmf's prologues
load weights before the wait and their inputs only after it.
GLM now launches its CUDA kernels as dependent launches, so the
ledger gains a row for the technique: GLM's cell points at the
issue, the other families stay unknown, the impact table names the
decode gain, and the entry records the rule that inputs a
predecessor writes must not be const __restrict__ and the SASS
check that enforces it.
Main's 450d5d8 added ledger rows 30-32 (Flash Next HIP fusion, stream-tile prefetch and the filled-item prompt
grid), so the previous commit's "30. Dependent launches" rows and entry take the next free number, 33. Nothing else
changes.
The qmmf commit re-measured four 16-row cluster tiles under nvcc 13.0
(50 and 58 registers on sm_120 and sm_121), but nvcc 13.3 still
compiles them at 48 and 56, as on main, and with no later entry they
showed as stale records. GLM's 13.2 set now holds them at main's
values, so 13.2 and later releases check them as main does; with it
the branch's 13.3 limits flag no record main does not already flag.
The receipt for GLM's kernels and qmmf's decode linears as dependent
launches at TP=2 on two GB10s: main against this branch on the same
expert form (plain decode +6.8%, drafted +4.0%, four streams +4.6%,
cold prompts no slower), equal tokens in every serve, the exactness
suites, the determinism runs that found the early-load race, the
kernel contract and limits against main's, the order test and the
SASS check, with raw results, prompts, tools and their checksums.
check-pdl-loads took the first ACQBULK in a function's listing as its
wait, so a predicated wait, or a branch from before the wait to code
past it, let a read run before the predecessor ended and still pass.
The checker now fails a predicated wait, an indirect branch before
the wait and any branch before it to a target past it other than an
EXIT, with fixtures for each; the GLM images and qmmf stay clean.
The SASS check lets weight-first bodies start async copies before the
wait without telling weights from inputs, and glm-pdl-order ran only
qmmf's BF16 decode rows, while GLM serves FP4 and MXFP8 ones. The
source scan now fails a weight load in qmmf or glm_mm that names the
input rows, and glm-pdl-order adds FP4 and MXFP8 decode rows, K
slices and clusters, from random finite codes and scales near one.
The guards grew after the receipt was written: glm-pdl-order now runs
qmmf's FP4 and MXFP8 decode rows too, and check-pdl-loads also fails
a predicated wait or a branch past it. The receipt carries their
reruns on GB10, 17 of 17 order cases passing and no problem in 402
functions, with its checksums refreshed.
@ashhart
ashhart force-pushed the glm-decode-pdl-carry branch from b7fee36 to 0d674a7 Compare November 19, 2026 22:11
@ashhart
ashhart merged commit 1022683 into ashhart:main Nov 19, 2026
1 of 10 checks passed
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thank you @ultradaoto. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

ashhart added a commit to jschmied/TensorFold that referenced this pull request Nov 19, 2026
ashhart added a commit to ultradaoto/TensorFold that referenced this pull request Nov 20, 2026
ashhart added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 20, 2026
… row 33

Main's dependent-launches row (ashhart#3776) took ledger row 33, so the previous commit's four below-target CUDA experiments
take the next free numbers: FP8 KV prefill waits 34, Qwen normalization and head 35, text metadata uploads 36,
greedy readback 37. Nothing else changes.
Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Nov 20, 2026
ashhart added a commit to gilby/TensorFold that referenced this pull request Nov 20, 2026
…dependent launches)

Main's 720f207 gave dependent launches (ashhart#3776) ledger row 33 while ashhart#3395 was in review, so its rows-together row and
entry become 34 in every table and the entry list. Nothing else changes.
ashhart added a commit to gilby/TensorFold that referenced this pull request Nov 20, 2026
…dependent launches)

Main's 720f207 gave dependent launches (ashhart#3776) ledger row 33 while ashhart#3395 was in review, so its rows-together row and
entry become 34 in every table and the entry list. Nothing else changes.
ashhart added a commit that referenced this pull request Nov 20, 2026
…dependent launches)

Main's 720f207 gave dependent launches (#3776) ledger row 33 while #3395 was in review, so its rows-together row and
entry become 34 in every table and the entry list. Nothing else changes.
Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Nov 20, 2026
…se-1120/tp4, tp2), and the cold prompts' token checks at TP=3
ashhart added a commit to ultradaoto/TensorFold that referenced this pull request Nov 21, 2026
ashhart added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 21, 2026
… row 33

Main's dependent-launches row (ashhart#3776) took ledger row 33, so the previous commit's four below-target CUDA experiments
take the next free numbers: FP8 KV prefill waits 34, Qwen normalization and head 35, text metadata uploads 36,
greedy readback 37. Nothing else changes.
ashhart added a commit to ultradaoto/TensorFold that referenced this pull request Nov 21, 2026
ashhart added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 21, 2026
… row 33

Main's dependent-launches row (ashhart#3776) took ledger row 33, so the previous commit's four below-target CUDA experiments
take the next free numbers: FP8 KV prefill waits 34, Qwen normalization and head 35, text metadata uploads 36,
greedy readback 37. Nothing else changes.
ashhart added a commit to devopsfortunato/TensorFold that referenced this pull request Nov 21, 2026
… row 33

Main's dependent-launches row (ashhart#3776) took ledger row 33, so the previous commit's four below-target CUDA experiments
take the next free numbers: FP8 KV prefill waits 34, Qwen normalization and head 35, text metadata uploads 36,
greedy readback 37. Nothing else changes.
ashhart added a commit that referenced this pull request Nov 21, 2026
Main's dependent-launches row (#3776) took ledger row 33, so the previous commit's four below-target CUDA experiments
take the next free numbers: FP8 KV prefill waits 34, Qwen normalization and head 35, text metadata uploads 36,
greedy readback 37. Nothing else changes.
ashhart added a commit to ultradaoto/TensorFold that referenced this pull request Nov 22, 2026
ashhart added a commit to ultradaoto/TensorFold that referenced this pull request Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants