Archived
libxe2: qk_norm_rope, conv1d_dw, conv2d, attn_local_rel rows
The encoder towers' ops that had only a host kernel: on the SYCL backend every op runs on the card, so a container carrying Gemma 4's vision tower (qk_norm_rope, blocks mode, v_norm) or its audio conformer (conv2d subsampler, conv1d_dw, attn_local_rel) refused to start. qk_norm_rope also serves GLM's vision tower (axial) and any QK-norm model that declares the fused op. Each is libref's loop, a work-item an output (a (row, head) for qk_norm_rope and attn_local_rel), for passes that run once a picture or clip. cu_seqlens stays on the card, so each work-item finds its own segment. rad-kbench, Gemma 4 E2B container: qk_norm_rope 80/80, conv1d_dw 64/64, conv2d 34/34, attn_local_rel 64/64; default fixture 2144/2144. Gemma 4 E2B now serves on Intel: text and an image request answer correctly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff4b7c9fb4
commit
25c8fbd136
4 files changed
+441
No files matched your search
@@ -120,6 +120,22 @@ const RadKernelInfo kKernels[] = {
|
||||
.computes = "the mean of k consecutive rows, f32 in order, rounded, times mult, rounded",
|
||||
.shape = "rows of n, M a multiple of k", .dtypes = "any float dtype",
|
||||
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::pool_rows },
|
||||
{ .name = "xe2_qk_norm_rope", .op = "qk_norm_rope", .family = "rope",
|
||||
.computes = "libref's per-head RMS norm (gain + wadd, or unit), rounded, then rotation: neox, gptj, blocks, gptj_blocks, imrope, axial; v_norm",
|
||||
.shape = "head_dim, rotary_dim <= 512; a work-item a (row, head)", .dtypes = "any float qkv, gains",
|
||||
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::qk_norm_rope },
|
||||
{ .name = "xe2_conv1d_dw", .op = "conv1d_dw", .family = "conv",
|
||||
.computes = "causal depthwise conv over time within cu segments, f32 in tap order, + bias, one rounding",
|
||||
.shape = "rows of n, k taps", .dtypes = "any float dtype",
|
||||
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::conv1d_dw },
|
||||
{ .name = "xe2_conv2d", .op = "conv2d", .family = "conv",
|
||||
.computes = "libref's segmented 2-D conv over (time, width), zero pad, frame mask, bias, gelu on the rounded value",
|
||||
.shape = "channels innermost, any stride / pad", .dtypes = "any float dtype",
|
||||
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::conv2d },
|
||||
{ .name = "xe2_attn_local_rel", .op = "attn_local_rel", .family = "attn",
|
||||
.computes = "Gemma 4 audio local attention with the relative term and tanh softcap, f32, transcendentals in double",
|
||||
.shape = "head_dim <= 256, left <= 63, right 0", .dtypes = "any float q, k, v, rel_k, o",
|
||||
.domain = RAD_DOMAIN_DEVICE, .launch = xe2::attn_local_rel },
|
||||
{ .name = "xe2_scatter_rows", .op = "scatter_rows", .family = "gather",
|
||||
.computes = "row m of v to row idx[m] of x; a negative index skipped, one past x refused",
|
||||
.shape = "any n and row counts; rows may be padded, the last axis dense",
|
||||
|
||||
Reference in new issue
Block a user