Archived
aql: no packet-header acquire on chained launches whose kernels acquire for themselves
A chained kernel that has lost its barrier bit is launched ahead of the kernels it depends on and reads nothing until its prologue wait has passed, where it acquires itself (and, since the previous change, empties the scalar cache). The acquire in its packet header runs when the packet processor launches the kernel, before the launches in front have written, so it guards nothing the kernel reads and only holds the packet processor: on an R9700, 2.1 us per launch with the agent-scope acquire against 1.2 us without. rad_kernel_chain may now answer 2 (libr4d's rows do): the chained forms' acquire covers everything they read. The loader records it (KernelRow::chain_fenced); the engine asks rad_dev_chain_infer(2) when chaining pays and every row that can chain, from every loaded library, says 2 (one row answering 1 keeps the acquire on all chained packets). The backend then issues a chained dispatch without its barrier bit with no header acquire, live and in played passes, unless the ring, the host epoch or a copy asks for one; releases, barrier packets, plain kernels and the prefetch stream are untouched, and a card with its arguments in VRAM and no HDP flush register keeps the acquire. RADIANCE_AQL_CHAIN_FENCE=1 puts it back on every chained launch. Qwen3.8-Flash-Next IQR-V4, TP2, MTP chain 3 with coupling, ABBA over 2 pairs: +0.75% tok/s [0.73, 0.78], all 156 texts identical. The three device tests added before now also run with the packets unacquired, and a shipped-plugins test requires libr4d's chained rows to answer 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
304597970f
commit
01f08152dc
11 files changed
+214
-50
No files matched your search
@@ -1642,6 +1642,17 @@ other model; the startup report's `chained launches` row says which and why. Whe
|
||||
than one card share their cards, a launch behind a collective keeps its barrier bit (about 1% of
|
||||
a step; MULTIMODEL §9.1).
|
||||
|
||||
A chained kernel acquires in its own prologue, behind its wait, so its packet goes out without
|
||||
the packet processor's acquire where every kernel library the engine loaded says its chained forms
|
||||
cover all they read there (`rad_kernel_chain` answering 2: libr4d's do, by emptying the scalar
|
||||
data cache behind the fence). That acquire holds the packet processor about 0.9 us a launch on an
|
||||
R9700 and comes before the kernel in front has written, so it guards nothing the launch reads. It
|
||||
did give the arguments the host had just written into VRAM the time to get there; the backend now
|
||||
sees to that itself and flushes the card's host data path in front of every doorbell, for every
|
||||
launch (a card that offers no flush register keeps the acquire). The log line `chained launches:
|
||||
on` says whether the packets take the acquire. `RADIANCE_AQL_CHAIN_FENCE=1` puts it back, to rule
|
||||
the change out.
|
||||
|
||||
**Draft trees.** Where the model's plugin measured a gain (the Gemma 4 31B with DFlash2: +7%
|
||||
single-stream decode and +6-9% aggregate at 1-16 users on 4x R9700, +4% and +6-12% on two,
|
||||
BetterBench with thinking off), a block drafter's proposals are verified as a tree: grown best-first
|
||||
@@ -4535,6 +4546,7 @@ TranslateGemma 18.3 ms a step, against 19.8-20.5.
|
||||
| `RADIANCE_G4_CALIB_LAYERS` | `lo:hi`: the same for `arch/gemma4`'s tap, which takes the Gemma 4 31B's Grams from its bf16 checkpoint (docs/ARCHITECTURES.md, gemma4) |
|
||||
| `RADIANCE_PROFILE_EVERY` | with `profile-ops`, dump the per-op table every N steps (default 32) |
|
||||
| `RADIANCE_AQL_STAMP`, `RADIANCE_AQL_STAMP_OUT` | `N`: time every dispatch of one recorded pass in N on card 0, each with a completion signal of its own, without changing its barriers or chains (`profile-ops` plays no recorded pass). One CSV line a dispatch (pass, record, queue, kernel, ordered, chained, start and end in ns) goes to `RADIANCE_AQL_STAMP_OUT` (default `/tmp/radiance-stamps-<pid>.csv`); `scripts/stampgaps.py` summarises it per kind of pass. AQL backend only |
|
||||
| `RADIANCE_AQL_CHAIN_FENCE` | `1`: a chained launch's packet keeps the packet processor's acquire even where the kernel libraries acquire in the kernel (§ "Chained launches"). For ruling the unfenced packets out of a fault, not for deployment: about 1% of a Qwen3.8-Flash-Next step. AQL backend only |
|
||||
| `RADIANCE_LOG_STEPS` | log one line per step: its phase, sequences, and each one's token count and context (§4.5) |
|
||||
|
||||
Engine development has its own instruments: `RADIANCE_DEBUG_*` (residual probes, routing and issue
|
||||
|
||||
Reference in new issue
Block a user