Commit Graph
2 Commits
Author SHA1 Message Date
Code000andClaude Opus 5.5 8f2e511fcc aql: flush the host data path before every doorbell; empty the scalar cache behind a chained wait
Two latent bugs that the packet processor's acquire (about 0.9 us a launch) has
been hiding by timing.

1. Kernel arguments and the chain record are written into VRAM through the BAR,
   and the card's host data path keeps such a write until it is flushed. Nothing
   ordered that against the doorbell (the sfence only orders the CPU's own
   buffers). A kernel the card starts a microsecond or two after its doorbell
   reads the slot as the launch one lap of the ring before left it: old
   arguments, or no chain record, in which case the launch counts nothing and
   the chained launch behind it waits for good. The backend now stores to the
   card's HDP flush register (HSA_AMD_AGENT_INFO_HDP_FLUSH) in front of every
   doorbell, in publish() and in a played pass's ring(). Without a register
   (the argument ring in host memory, or a driver that gives none) nothing
   changes, and a warning says so at startup.

2. rad_chain_wait()/r4d_chain_wait() end in an agent-scope acquire fence, which
   invalidates the vector caches. A load whose address every lane shares is a
   scalar load, served from the scalar data cache, and nothing but the packet
   processor's acquire (which runs when the kernel is launched, before the
   launch in front has written) empties that. A chained kernel can therefore
   read a stale scale, count or activation from the arena address an earlier
   launch read. The waits now issue s_dcache_inv behind the fence
   (r4d_chain_acquire in libr4d, chain_kernel.h in the core's blit kernels).

Evidence on an R9700 with the packet acquire left as it is: a probe of
1024-block readers behind a chained wait saw a stale shared value in 1 launch
of 1800 without the s_dcache_inv and in none with it; card-side copies issued
one by one with 50 us between them stalled the queue in its first lap, four
runs in four, and six runs in nine of 300000 back to back ended with a unit
moved by another launch's arguments, when the packets went without their
acquire and without the flush, and in none with the flush.

New device tests: a chained reader sees a shared value the launch in front
wrote, a chained launch reads its own arguments after the ring has lapped, and
a copy issued after a pause finds the record written for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:16:12 +01:00
Deadcode ddcb9c69bb radiance 2.0.0
Radiance becomes a multi-model engine: one process serves several models behind one port, loads
each when a request names it, parks it in host memory or restores it from its container, and
shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the
command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP).

Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an
int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block
FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such
weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5,
Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B,
the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0
serves all of them.

Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new
Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill
reworked, and a reworked adaptive draft window.

Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its
configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool
in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server,
each accelerator's memory by model, model states over time.

Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by
AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests
keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410);
eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d
large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi
(#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon
(#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and
multi-model serving as asked for in #367 and #109.

Plugin ABI 39: out-of-tree plugins need to be rebuilt.

Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz.
2026-11-14 22:32:28 +01:00