This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
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

4.4 KiB

libhalo

libhalo is radiance's kernel library for Strix Halo (gfx1151, RDNA 3.5, the Radeon 8060S in the Ryzen AI Max+ 395): specialised HIP kernels behind the same plain C ABI libr4d exposes, with halo_ in place of r4d_ (halo.h), and the kernel-plugin rows the engine selects from (halo_rows.cpp).

libhalo and libr3d

libr3d serves the whole RDNA3 family (^gfx11), gfx1151 included; libhalo serves gfx1151 only. Both are built when RAD_GPU_TARGETS names gfx1151, and on a Strix Halo libhalo is the one used:

  • with no kernels list the loader takes libraries in file-name order, so libhalo.so comes ahead of libr3d.so, and the first library with a row for an op supplies it (docs/PLUGIN.md). An op libhalo has no row for falls through to libr3d;
  • rad_plugin_open (halo_rows.cpp) declines every machine whose KFD topology lists no gfx1151, so on another RDNA3 card libhalo is not loaded at all and declares no schema: libr3d serves it alone. The loader would leave libhalo's device rows out there anyway (its code objects are gfx1151's); declining also keeps its schemas out, and keeps rad-convert, which resolves kernels without that check, from laying weights out for it. A process without /dev/kfd (a container given no card, a machine with no amdgpu) sees no gfx1151 and declines it too.

An explicit kernels list (server.kernels, or a tool's --kernels) orders the libraries as given; name libhalo before libr3d.

What is shared with libr4d, and what is not

Shared, by design, so one container serves both cards:

  • the op vocabulary and schemas (the loader refuses a library whose schema for an op disagrees with the first declaration, so these cannot drift silently);
  • row names, so halo_selftest (derived from r4d_selftest, whose cases address rows by name) and rad-kbench check libhalo's kernels against the same cases and recordings as libr4d's;
  • stored weight layouts whose bytes do not encode a WMMA fragment order, tags included (r4d.* layout tags name arrangements, not libraries).

Not shared: anything measured. Priorities, constraint bands, tunable defaults, launch geometries and the kernel bodies themselves are libhalo's own, derived from libr4d's sources (each file says so) and re-measured on gfx1151. Fragment-ordered weights are stored in gfx1151's fragment order under halo.* tags: a fragment order is a statement about one architecture's WMMA lanes (see halo_wmma.h), and storing gfx1201 order would make every halo GEMM pay an in-register shuffle to read it. The canonical planes a container holds, the dequantised values and the reference outputs are identical either way (spec §4.3).

Two properties of the part shape everything here and are not restated per kernel:

  • unified memory: device memory is host memory (a 120 GiB GTT pool inside the machine's RAM). There is no link, so "stream the weight" and "stage the weight" differ only in which copy of the bytes a kernel reads, and the core's unified-memory path keeps one ledger for both pools;
  • ~256 GB/s of LPDDR5X shared with the CPU, 40 CUs, wave32. Decode is a pure weight stream at a quarter of the R9700's bandwidth; launch geometry that fills 64 CUs idles here.

Porting state

Kernel units land family by family in HALO_UNITS (CMakeLists.txt). Until a unit lands, its rows resolve to generated stubs in halo_stubs.cpp that return RAD_E_UNSUPPORTED, so the library loads, selection works, and the gap is reported by name at first use. The stub count is the parity scoreboard; done means zero. Chained launch forms (halo_chain.h) follow the plain forms per family; rad_kernel_chain names a row only once all of its kernels have one.

Adding a kernel

As in libr4d: write the .hip named for its entry point and geometry, declare it in halo.h, add or adjust the RadKernelInfo row in halo_rows.cpp, and add a case to halo_selftest.cpp. HALO_UNITS and the stubs are generated: run python3 libhalo/gen_stubs.py after adding the file instead of editing either by hand (libhalo/PORTING.md). Stubs are weak, so there is no stub line to delete when a unit lands. Check numerics with halo_selftest <path to libhalo.so> --case <row> and rad-kbench --kernels libhalo,libref; check speed on the card, in the same run, against the shape's roofline. libhalo/PORTING.md is the porting guide: the rename transform, the gfx1151 fragment rules, the wrapper-file pattern and the gotchas already paid for.