radiance 1.8.0

- video: MiniMax-H3 and FastVideo's FastH3 8-Step V2, a video with its stereo soundtrack from text
  on OpenAI's /v1/videos, block fp8 on two cards
- music: MiniMax-Music3, songs from lyrics and a description on /v1/audio/speech
- speech: Breeze-TTS-2 on /v1/audio/speech and vLLM-Omni's realtime WebSocket
- runtime LoRA adapters beside the base model, picked per request by `model` (baKon, #105)
- several agent streams keep their cached history: --checkpoint-slots auto, the new default, sizes
  the snapshot store by --max-num-seqs (#108)
- the Swift 1.5 27B W4 releases convert and serve: compressed-tensors AWQ and GPTQ int4, AutoRound,
  ModelOpt NVFP4 (#110)
- the image's host tests pass where perf_event_open is refused, as in BuildKit's sandbox (#106)
- plugin ABI 21: out-of-tree plugins must be rebuilt
This commit is contained in:
Deadcode committed 2026-10-18 11:38:37 +02:00
1 parent 91127395ee
commit 7a7707a955
179 files changed
+37542 -1892

No files matched your search

+11 -11
View File
@@ -1,28 +1,28 @@
/* lora_cases.h -- the runtime-LoRA case matrix and what every implementation is held to, shared by
* tests/lora_ops_test.cpp (libref and libavx, at every ISA level the machine runs) and
* tests/r4d_emu/test_lora.cpp (libr4d's source on the SIMT emulator, beside libref and the host
* restatement in ref_host.cpp). One matrix and one checker, so "the same cases" is a fact and not
* an intention.
* restatement in ref_host.cpp). One matrix and one checker, so every implementation runs the same
* cases.
*
* THE MATRIX. M in {1, 3, 17, 64, 130}, R in {16, 32, 48}, S = 4, K (and N) in {64, 256, 1000};
* The matrix: M in {1, 3, 17, 64, 130}, R in {16, 32, 48}, S = 4, K (and N) in {64, 256, 1000};
* `a` bf16, or E4M3 with an f32 scale every 128 columns (1000 leaves a partial group, 64 a row
* narrower than one group); `y` bf16 and f32. Then the other dtypes once over a smaller grid: `a`
* f16, f32, E5M2 and i8 (the last two with scales), `y` f16. `a`, its scale stream and `y` are
* COLUMN SLICES of wider buffers. Slots cycle through -1, -5, 0..3 and 4 (= S): three spellings
* of a base row beside the adapter rows, M = 1 once as an adapter row and twice as a base one.
* column slices of wider buffers. Slots cycle through -1, -5, 0..3 and 4 (= S): three spellings of
* a base row beside the adapter rows, M = 1 once as an adapter row and twice as a base one.
*
* WHAT IS CHECKED, per implementation, per case:
* * BASE ROWS ARE UNTOUCHED, BY BYTES. Shrink leaves the sentinel NaN pattern `t` was filled
* with; expand leaves `y` -- every third element a -0, which `y + 0` would turn into +0 -- and
* Checked per implementation, per case:
* - Base rows are untouched, by bytes. Shrink leaves the sentinel NaN pattern `t` was filled
* with; expand leaves `y` (every third element a -0, which `y + 0` would turn into +0) and
* every column outside the slice as they were.
* * ADAPTER ROWS AGAINST A DOUBLE-PRECISION SUM of the same f32 terms (x(m, k) is the code times
* - Adapter rows against a double-precision sum of the same f32 terms (x(m, k) is the code times
* its scale rounded to f32, as the contract defines it). Shrink: |t - sum| <= (K + 2) 2^-24
* sum|terms|, the worst case of an f32 dot in any summation order, so no implementation can
* fail it by choosing an order and every one fails it by reading a wrong element. Expand:
* |y - want| <= h (|want| + e) + 2 e with e = 4 (R + 2) 2^-24 (|y| + |scale| sum|terms|) and h
* half an ulp of y's dtype relative (2^-8 bf16, 2^-11 f16, 0 f32).
* * An implementation marked `ref_bytes` must also produce, for expand, exactly the bytes of the
* first implementation in the list -- the claim libr4d's expand makes about libref's order.
* - An implementation marked `ref_bytes` must also produce, for expand, exactly the bytes of the
* first implementation in the list, the claim libr4d's expand makes about libref's order.
*
* A shrink row with a scratch hook (libr4d's WMMA row keeps its K split's partials there) is handed
* the scratch the hook asks for, filled with a non-zero pattern, as the core would hand it a slice of
+13 -13
View File
@@ -2,17 +2,17 @@
*
* The case matrix and every check are lora_cases.h's, shared with tests/lora_ops_test.cpp (libref and
* libavx): base rows untouched by bytes, adapter rows against a double-precision sum within the
* bounds stated there. Here the implementations are the emulated kernels -- the v1 scalar rows and
* the tiled rows (WMMA shrink, LDS-staged expand) -- ref_host.cpp's restatement of libref's
* arithmetic, and libref itself when $RADIANCE_HOME holds one (ctest sets it); every emulated
* EXPAND is held to the first of those bit for bit, because its j-ascending sum and its roundings
* are libref's. Shrink is held to the bound rather than to libref's bytes: v1 sums k in 32 lane
* bounds stated there. Here the implementations are the emulated kernels (the scalar rows and the
* tiled rows: WMMA shrink, LDS-staged expand), ref_host.cpp's restatement of libref's arithmetic,
* and libref itself when $RADIANCE_HOME holds one (ctest sets it). Every emulated expand is held
* to libref's restatement bit for bit, because its j-ascending sum and its roundings are libref's.
* Shrink is held to the bound rather than to libref's bytes: the scalar row sums k in 32 lane
* strides and a butterfly, the WMMA row in 32-wide steps over waves and a K split.
*
* Then what the tiled rows promise beyond the matrix, each proven here on the emulator:
*
* shapes the real ones -- K 2048 / 5120 / 6144 / 17408, R 16 / 48 / 64 / 192, N 256 ..
* 12288, odd M, S 1..4, bf16 and E4M3 with a scale every 128 -- shrink to the f64
* shapes the real ones (K 2048 / 5120 / 6144 / 17408, R 16 / 48 / 64 / 192, N 256 ..
* 12288, odd M, S 1..4, bf16 and E4M3 with a scale every 128): shrink to the f64
* bound (and its worst error printed against f64), expand to libref's bytes.
* batch a row computed alone (M = 1) and as row p of M in {7, 16, 17, 37, 300}, the others
* random slots and base rows: its t and y bits are the same. Every K split, z fan-out
@@ -303,7 +303,7 @@ static std::vector<int32_t> rand_slots(std::mt19937& rng, int M, int S, int base
return v;
}
/* REAL SHAPES. Each pair is shrink -> expand, as the engine issues it: expand reads the t the
/* Real shapes. Each pair is shrink -> expand, as the engine issues it: expand reads the t the
* tiled shrink wrote, and is held to libref's bytes over that same t. */
static void test_shapes(const Rows& R) {
std::mt19937 rng(23);
@@ -344,7 +344,7 @@ static void test_shapes(const Rows& R) {
sizeof(shapes) / sizeof(shapes[0]), wb, wr, std::ldexp(1.0, -24));
}
/* BATCH INVARIANCE: a row alone and inside batches of other slots and base rows. */
/* Batch invariance: a row alone and inside batches of other slots and base rows. */
static void test_invariance() {
std::mt19937 rng(41);
struct Sh { int K, R, N, S; uint32_t adt, ydt; };
@@ -435,7 +435,7 @@ static void test_invariance() {
"positions, aligned and unaligned)\n", compared);
}
/* BASE ROWS ONLY: a prefill-sized launch of nothing but base rows touches no byte of t or y. */
/* Base rows only: a prefill-sized launch of nothing but base rows touches no byte of t or y. */
static void test_all_base() {
std::mt19937 rng(5);
std::vector<int32_t> slot((size_t)2048);
@@ -453,9 +453,9 @@ static void test_all_base() {
std::printf("lora base rows only: M 2048, t and y untouched\n");
}
/* EVERY CODE through a one-hot pool: A[s, j, k] = (k == j), so t[m, j] = x(m, j) = code * scale
* exactly -- one exact product, the rest +-0 -- and the WMMA row's code widening is checked code
* by code. Codes whose value is NaN or Inf would turn every j's zero products into NaN, so they
/* Every code through a one-hot pool: A[s, j, k] = (k == j), so t[m, j] = x(m, j) = code * scale
* exactly (one exact product, the rest +-0), and the WMMA row's code widening is checked code by
* code. Codes whose value is NaN or Inf would turn every j's zero products into NaN, so they
* get rows of their own, where every t must be NaN as in the f64 sum. */
static void test_codes() {
int checked = 0;