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 -12
View File
@@ -176,17 +176,16 @@ AVX_KERNEL(ple_gate) {
* Absent, every token commits and the last (width-1)*dilation inputs land at offset zero. The
* write happens in a SECOND pass after every read is done, because a sequence longer than the
* window would otherwise overwrite history it is still reading. */
AVX_KERNEL(ple_conv) {
if (a->n_t < 9) return RAD_E_INVAL;
const RadTensor* x = rad_arg_in(a, 0);
const RadTensor* w = rad_arg_in(a, 1);
const RadTensor* cs = rad_arg_in(a, 2);
const RadTensor* cu = rad_arg_in(a, 3);
const RadTensor* resid = rad_arg_in(a, 4);
const RadTensor* sidx = rad_arg_in(a, 5);
const RadTensor* hini = rad_arg_in(a, 6);
const RadTensor* nacc = rad_arg_in(a, 7);
const RadTensor* y = rad_arg_in(a, 8);
/* ONE BODY FOR ple_conv AND causal_conv1d (LFM2's short convolution: undilated, no activation, no
* residual), as in libref, so the two cannot disagree about the window's layout. */
struct ConvOps {
const RadTensor *x, *w, *cs, *cu, *resid, *sidx, *hini, *nacc, *y;
bool silu;
};
static int depthwise_causal_conv(const RadArgs* a, const ConvOps& o) {
const RadTensor *x = o.x, *w = o.w, *cs = o.cs, *cu = o.cu, *resid = o.resid;
const RadTensor *sidx = o.sidx, *hini = o.hini, *nacc = o.nacc, *y = o.y;
if (!x || !w || !cs || !cu || !y) return RAD_E_INVAL;
const int64_t n = p_int(a, "n", 0);
@@ -260,7 +259,7 @@ AVX_KERNEL(ple_conv) {
acc += vv * tap[j];
}
const float r = resid ? ldt(resid, (bos + t) * rrow + c * rcol) : 0.0f;
stt(y, (bos + t) * yrow + c * ycol, r + acc / (1.0f + std::exp(-acc)));
stt(y, (bos + t) * yrow + c * ycol, r + (o.silu ? acc / (1.0f + std::exp(-acc)) : acc));
}
}
@@ -298,6 +297,22 @@ AVX_KERNEL(ple_conv) {
return RAD_OK;
}
AVX_KERNEL(ple_conv) {
if (a->n_t < 9) return RAD_E_INVAL;
return depthwise_causal_conv(a, { rad_arg_in(a, 0), rad_arg_in(a, 1), rad_arg_in(a, 2),
rad_arg_in(a, 3), rad_arg_in(a, 4), rad_arg_in(a, 5),
rad_arg_in(a, 6), rad_arg_in(a, 7), rad_arg_in(a, 8), true });
}
/* ple_conv's operands without `resid`, at dilation one and with no activation. */
AVX_KERNEL(causal_conv1d) {
if (a->n_t < 8) return RAD_E_INVAL;
if (p_int(a, "dilation", 1) != 1) return RAD_E_INVAL;
return depthwise_causal_conv(a, { rad_arg_in(a, 0), rad_arg_in(a, 1), rad_arg_in(a, 2),
rad_arg_in(a, 3), nullptr, rad_arg_in(a, 4),
rad_arg_in(a, 5), rad_arg_in(a, 6), rad_arg_in(a, 7), false });
}
/* ------------------------------------------------------------------ ngram_ids
*
* ids[m][h] = (hash of the n-gram ending at m) % vocab[h] + offset[h].