radiance 1.4.0

- Qwen3.8-Flash-Next on one card: the heat engine moves 64 experts a step (was 8), its copies and
  the prefill's expert staging run on the card's DMA engines instead of as copy kernels, and at
  decode the next layer's likeliest experts are copied onto the card ahead of its GEMMs. Against
  1.3.0 at --tp 1: prefill +17-20% from 8K tokens up, throughput under load +16-20%
- deploy/compose/flashnext-tp1.yaml: Qwen3.8-Flash-Next on one card and 64 GB of host RAM
  (4096-token prefill steps, 4 sequences, a 301K-token cache)
- #61: --busy-prefill-chunk (default auto): a long prefill leaves the rest of the step to the
  requests decoding beside it and to new arrivals, instead of taking all of it (baKon)
- LiquidAI's LFM2 and LFM2-VL, and d1's /v1/systemone (after zivius's PR #50)
- a startup report: every option with its value and where it came from, the hardware, and what
  on it costs speed with the fix; /diagnostics serves it (behind the API key; without one, only
  to the same machine)
- #69: a GPU memory fault names the buffer and kernel argument behind it and ends the server at
  once (exit status 70), instead of hanging or writing a core of tens of gigabytes
- #64: a card without Resizable BAR is refused at startup, naming what to turn on, instead of
  crashing at the first launch
- the image is built with ROCm 10.1 (the host's amdgpu driver must support it), with ROCm's
  libLLVM rebuilt so the same source compiles to the same kernels every time; a source build
  takes ROCm 10.1 or 7.2
- #71: the image ships curl, jq and a CA bundle, so --model <HF repo id> works in the container,
  and hfget.sh runs under its busybox (baKon)
- --profile-ops shows how long each op's lane sat idle before it; cardclock.py skips an
  integrated GPU instead of stopping
This commit is contained in:
Deadcode committed 2026-10-12 11:46:14 +02:00
1 parent d5b65cddc6
commit dc339b4cd2
153 files changed
+12956 -1067

No files matched your search

+27
View File
@@ -124,6 +124,11 @@ static const RadParamSpec pPleConv[] = { P_INT("M"), P_INT("n"), P_INT("width"),
static const RadOperandSpec oPleConv[] = { OPD("x"), WGT("w"), INOUT("conv_state"), OPD("cu"),
OPD_O("resid"), OPD_O("cache_idx"), OPD_O("has_init"),
OPD_O("num_accepted"), OUT("y") };
static const RadParamSpec pCausalConv[] = { P_INT("M"), P_INT("n"), P_INT("width"),
P_STR("dtype") };
static const RadOperandSpec oCausalConv[] = { OPD("x"), WGT("w"), INOUT("conv_state"), OPD("cu"),
OPD_O("cache_idx"), OPD_O("has_init"),
OPD_O("num_accepted"), OUT("y") };
static const RadParamSpec pHcWrite[] = { P_INT("M"), P_INT("n"), P_INT("hc"), P_STR("dtype") };
static const RadOperandSpec oHcEnter[] = { OPD("x"), OUT("h") };
@@ -655,6 +660,11 @@ static const RadOpSchema kSchemas[] = {
"`coord` is [4, M] -- row, column, grid height, grid width -- and the position is sampled "
"bilinearly with the grid's corners on the table's corners (align_corners), edge taps clamped. "
"The taps are summed in f32 and rounded to x's dtype, then added to x and rounded again." },
{ "grid_embed_aa", ARR(pGridEmbed), ARR(oGridEmbed),
"x += the side x side table resampled as torch's F.interpolate(bilinear, align_corners=False, "
"antialias=True) resamples it to the row's grid -- SigLIP2's position embedding: per axis a "
"triangle filter on half-pixel centres, widened by the scale when shrinking, its in-table taps "
"normalised. Separable, f32, rounded once before the add; coordinates clamp into their grid." },
{ "add", ARR(pMnD), ARR(oBinary),
"y = a + b. An operand carrying exactly n elements against a taller output broadcasts along "
"rows; nothing else broadcasts." },
@@ -723,6 +733,12 @@ static const RadOpSchema kSchemas[] = {
"(width-1)*dilation - 1 slots plus one a token. Absent, every token commits: the read is at "
"offset zero and the last (width-1)*dilation inputs land at offset zero, which is the prefill "
"chunk. `resid` absent drops the add and leaves the plain convolution." },
{ "causal_conv1d", ARR(pCausalConv), ARR(oCausalConv),
"y[t] = sum_j w[c][j] * x[t - (width-1-j)], a DEPTHWISE CAUSAL convolution with no activation "
"and no residual (LFM2's short convolution, whose gates the caller applies). The state, "
"`has_init`, `cache_idx` and `num_accepted` are ple_conv's at dilation one: a window of width-1 "
"values, read at `num_accepted - 1` and rewritten shifted by one with every input of a decode "
"step behind it, or left as the chunk's last width-1 inputs when `num_accepted` is absent." },
{ "ngram_ids", ARR(pNgramIds), ARR(oNgramIds),
"ids[m][h] = remainder(hash of the n-gram ending at m, vocab_sizes[h]) + offsets[h], where "
"hash = t0*mult[0] ^ t1*mult[1] ^ ... over as many shifted tokens as head h's block needs -- "
@@ -1094,6 +1110,9 @@ SIMPLE("ref_layernorm", "layernorm", "norm", "layer norm with gain and bias", DT
ref_layernorm),
SIMPLE("ref_grid_embed", "grid_embed", "elem",
"bilinear resample of a learned position grid, added in", DT_FLOAT, ref_grid_embed),
SIMPLE("ref_grid_embed_aa", "grid_embed_aa", "elem",
"antialiased half-pixel bilinear resample of a position grid, added in", DT_FLOAT,
ref_grid_embed_aa),
SIMPLE("ref_add", "add", "elem", "elementwise sum", DT_FLOAT, ref_add),
SIMPLE("ref_mul", "mul", "elem", "elementwise product", DT_FLOAT, ref_mul),
SIMPLE("ref_silu_mul", "silu_mul", "elem", "silu-gated product over a fused gate_up", DT_FLOAT,
@@ -1126,6 +1145,8 @@ SIMPLE("ref_ple_gate", "ple_gate", "norm", "PLE gate: three grouped norms, a dot
DT_FLOAT, ref_ple_gate),
SIMPLE("ref_ple_conv", "ple_conv", "norm", "PLE's dilated depthwise conv, silu and residual add",
DT_FLOAT, ref_ple_conv),
SIMPLE("ref_causal_conv1d", "causal_conv1d", "conv", "depthwise causal conv, no activation",
DT_FLOAT, ref_causal_conv1d),
SIMPLE("ref_gather_rows", "gather_rows", "elem", "y[i,:] = x[idx[i],:]", DT_ANY, ref_gather_rows),
SIMPLE("ref_scatter_rows", "scatter_rows", "elem", "x[idx[i],:] = v[i,:]", DT_ANY, ref_scatter_rows),
SIMPLE("ref_cast", "cast", "elem", "dtype conversion", DT_ANY, ref_cast),
@@ -1305,3 +1326,9 @@ extern "C" const RadKernelInfo* rad_kernel_at(int i) {
if (i < 0 || i >= rad_kernel_count()) return nullptr;
return &kKernels[i];
}
/* The rows that join the other ranks (ref_collective.cpp), said through the ABI
* (RadKernelCollectiveFn) so the gather counts as one as well as the all-reduce. */
extern "C" int rad_kernel_collective(int i) {
const RadKernelInfo* k = rad_kernel_at(i);
return k && k->init == ref_collective_init;
}