radiance 1.0.10

- Four-rank Qwen3.8-Flash-Next (PRs 14 and 16 by keptn42): the all-reduce runs fused with the
  hyper-connection's write, and with the MoE gather in front of it, on decode and verify steps on
  the exact wire. The routed experts are split in four classes, so every rank computes the same
  share; moe_gemm_q_mod4 is the new grouped GEMM. The oracle now checks moe_gemm_q on w4nl and
  w5nl containers.
- --embedding-placement and --ngram-placement, each auto | vram | ram | disk. The token embedding
  can live in the pinned host pool, read in place over the link (from PR 17 by mechkbfan). An n-gram
  table can be copied into locked RAM at load instead of read from the container (from PR 15 by
  keptn42). auto takes the fastest tier with room once every other weight is placed, and startup
  prints what it chose and why. A tier that cannot be honoured stops the start with the reason; the
  embedding on disk and the n-gram table in VRAM are refused, since nothing can serve them.
- The expert_tiered placement no longer spends the pinned host pool twice when it falls back to
  layer offload, and a lossy-wire request for a four-rank fused write is a selection miss rather
  than a startup abort.
This commit is contained in:
Deadcode committed 2026-10-05 14:01:30 +02:00
1 parent 2f56e3c477
commit e466fa07e2
56 files changed
+1804 -761

No files matched your search

+14 -3
View File
@@ -839,10 +839,14 @@ struct MoeCls {
*
* FOUR CLASSES AND THE TABLE MUST FIT RAD_KPARAM_BLOB (256 bytes) BESIDE EVERYTHING ELSE, because
* a kernel's arguments are packed into one descriptor whether it is launched or described: four
* classes at 40 bytes, the five operand pointers and the map, eight words and this. That is why a
* class carries 32-bit entry strides and no table of its own, and why `mode` packs three small
* values into one word. */
* classes at 40 bytes, the five operand pointers and the map, eight words and this -- 160 + 48 +
* 32 + 16, exactly 256, with no padding since a class is 8-aligned. That is why a class carries
* 32-bit entry strides and no table of its own, and why `mode` packs three small values into one
* word. The sizes are asserted here and the whole list after the kernel. */
struct MoeTab { uint32_t v[4]; };
static_assert(sizeof(MoeCls) == 40 && alignof(MoeCls) == 8,
"a class is two pointers and six words: the kernel's argument budget counts 40");
static_assert(sizeof(MoeTab) == 16, "the code table is four words");
/* W4 IS THE WEIGHT'S FORM: 0 block E4M3, 1 four-bit with one bf16 scale a (row, 128 of K), 2 the
* same codes with one E4M3 scale a (row, 64 of K) times the fixed kW4G64Scale (w4nl64a8h), 3 the
@@ -1321,6 +1325,13 @@ __global__ __launch_bounds__(WGM * WGN * kWave) void moe_gemm_q_kernel(
if (ES) break; /* one run a block, and it is done */
}
}
/* The whole argument list against the descriptor (see MoeTab): every instantiation takes the same
* parameters, so the decode form stands for all of them. */
using MoeQArgs = R4dParams<decltype(moe_gemm_q_kernel<1, 4, 1, 4, 0, true>)>;
static_assert(MoeQArgs::bytes() <= RAD_KPARAM_BLOB,
"moe_gemm_q_kernel's arguments overflow RAD_KPARAM_BLOB");
static_assert(MoeQArgs::count <= RAD_MAX_KPARAMS,
"moe_gemm_q_kernel has more arguments than RAD_MAX_KPARAMS");
/* ================================================================== moe_gemm, bf16
*