Archived
libxe2, arch/common: the 28 Oct pending set, the bf16 cast fused, the vectorized norm, a draft-vocab prefix
- gdn_kkt_solve on DPAS (~0.4 ms at 2048 tokens against 7.7), the int8 head's DPAS forms at 9-16 rows (verify past depth 7), the plain block norm (RadBuildCtx::plain_norm, set on the SYCL backend: `add` + `rmsnorm` where no reader takes the E4M3 codes) with the fast rmsnorm rows. - rmsnorm's bf16 rows up to 8192 wide: a work-item eight elements by one 16-byte load (the generic form walked 20 dependent loads a work-item): 24.7 -> 3.3 us a decode norm, ~3.5 ms a round. - w4a16: a bf16 activation narrowed to fp16 at the kernel's own load (the separate cast launch before every GEMM is gone), bit for bit the same. - RADIANCE_MTP_DRAFT_VOCAB=N: the 2-bit draft head over the vocabulary's first N ids (a prefix shortlist, GRIMOIRE's idea); the u2 layout hook takes an op N below the weight's rows. 131072: greedy acceptance identical on the decode proxy, draft head 650 -> 351 us a pass. KL against the exact-kernel reference (2002 positions): 0.002386, top-1 97.30% (was 0.002376 / 96.80%). Decode proxy (greedy, depth 5, mtp4): 72.0 -> 74.3 tok/s with the prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7580ec3d17
commit
726e532114
18 files changed
+472
-54
No files matched your search
@@ -92,14 +92,18 @@ int gemm_zp_layout(const RadParam* p, int n_p, int operand, const RadEncoding* e
|
||||
return RAD_E_UNSUPPORTED;
|
||||
const long long N = rad_param_geti(p, n_p, "N", 0), K = rad_param_geti(p, n_p, "K", 0);
|
||||
const long long group = rad_param_geti(p, n_p, "group", 0);
|
||||
if (!zp_tiled(2, N, K, group)) return RAD_E_UNSUPPORTED;
|
||||
if (planes[0].shape[0] != N || planes[0].shape[1] != K) return RAD_E_SHAPE;
|
||||
/* An op may read a prefix of the rows (the MTP draft head's shortlist, rad_arch.h
|
||||
* mtp_draft_rows): the stored form is the whole weight's, tile-major, so a prefix of
|
||||
* whole tiles is a prefix of it. */
|
||||
const long long Nw = planes[0].shape[0];
|
||||
if (!zp_tiled(2, N, K, group) || !zp_tiled(2, Nw, K, group)) return RAD_E_UNSUPPORTED;
|
||||
if (N > Nw || planes[0].shape[1] != K) return RAD_E_SHAPE;
|
||||
out->tag = kTagU2;
|
||||
out->dtype = RAD_U2;
|
||||
out->rank = 1;
|
||||
out->shape[0] = N * K;
|
||||
out->shape[0] = Nw * K;
|
||||
out->align = 0;
|
||||
out->bytes = N * K / 4;
|
||||
out->bytes = Nw * K / 4;
|
||||
return RAD_OK;
|
||||
}
|
||||
if (n < 2 || operand != 3) return RAD_E_UNSUPPORTED;
|
||||
|
||||
Reference in new issue
Block a user