Merge upstream main (v1.17.0 -> v2.1.0) into the SYCL port

102 upstream commits. Nine conflicts resolved. Fork side of the merge:
- libxe2: declare the givens_dense_quant schema (upstream 2.0 dropped it
  from libavx and libref; the device libraries now each carry it).
- plain_norm becomes an ABI 42 append to RadBuildCtx; abi layout table
  regenerated, kTableAbi = 42.

Known before the PR: arch_test (MTP lint and pinned graph hashes for
qwen35_fp8, qwen35moe_fp8, qwen4exp with MTP).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
aneinanderandClaude Opus 5.5 committed 2026-11-18 15:06:17 +01:00
commit 4b70a96378
850 files changed
+157819 -58519

No files matched your search

+27
View File
@@ -902,6 +902,25 @@ const RadOperandSpec oQkNormRopeGateKv[] = {
{ "kv_cache", RAD_OPD_INOUT, 0 },
};
/* givens_dense_quant (libr4d's / libhalo's pGivensDense / oGivensDense). Upstream 2.0 dropped the
* host rows and schema from libavx and libref, so the device libraries each declare it; without it
* a SYCL build has no schema for this row and the loader stops. */
const RadParamSpec pGivensDense[] = {
{ "M", RAD_P_INT, RAD_REQUIRED },
{ "n", RAD_P_INT, RAD_REQUIRED },
{ "group", RAD_P_INT, RAD_REQUIRED },
{ "dtype", RAD_P_STR, RAD_REQUIRED },
{ "parts", RAD_P_INT, RAD_REQUIRED },
{ "out", RAD_P_STR, RAD_REQUIRED },
};
const RadOperandSpec oGivensDense[] = {
{ "x", RAD_OPD_IN, 0 },
{ "tdense", RAD_OPD_WEIGHT, 0 },
{ "rscale", RAD_OPD_WEIGHT, 0 },
{ "q", RAD_OPD_OUT, 0 },
{ "scale", RAD_OPD_OUT, 0 },
};
/* gate_quant_fp8 (libr4d's pGateQuantFp8 / oGateQuantFp8): the gate in its own operand. */
const RadParamSpec pGateQuantFp8[] = {
{ "M", RAD_P_INT, RAD_REQUIRED },
@@ -945,6 +964,14 @@ const RadOpSchema kSchemas[] = {
"qk_norm_rope_gate followed by kv_store, in one launch: each k head's block also writes "
"its rotated k and its v into the paged cache at the token's slot. The `k` kv_store "
"reads is `k_out`, so the tail adds only `v`, `slot_mapping` and `kv_cache`." },
{ "givens_dense_quant", pGivensDense, (int)(sizeof pGivensDense / sizeof pGivensDense[0]),
oGivensDense, (int)(sizeof oGivensDense / sizeof oGivensDense[0]),
"ParoQuant's activation quantiser with the rotation as a dense per-group matrix: y = T (x / "
"rscale) for each of `parts` rotated copies, T the [128, 128] f16 matrix a (part, 128-column "
"group) that its Givens stages compose to, then the block-scaled quantiser `out` names "
"(\"i8\": scale amax / 127, round to nearest; \"fp8\": E4M3, amax / 448). q is [M, parts * n] "
"and scale [M, parts * n / group]; tdense is [parts * n, 128]. The same activation as "
"the sequential rotation, up to the f16 rounding of T." },
{ "gate_quant_fp8", pGateQuantFp8, (int)(sizeof pGateQuantFp8 / sizeof pGateQuantFp8[0]),
oGateQuantFp8, (int)(sizeof oGateQuantFp8 / sizeof oGateQuantFp8[0]),
"act(gate) * x rounded to bf16 (act sigmoid, its result rounded to bf16 first, or none), "