Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

gu_swiglu: the 80-dots-a-row guard for every format (Gyro's trellis gate/up rows went through the 16-lane kernel)

Niko12218837cb6f0f07
diff --git a/src/kernels/cuda/iq_kernels.cu b/src/kernels/cuda/iq_kernels.cu
index 4880150f1..4d988f1ae 100644
--- a/src/kernels/cuda/iq_kernels.cu
+++ b/src/kernels/cuda/iq_kernels.cu
@@ -3859,8 +3859,10 @@ bool launch_gu_swiglu(const NativeExpertLayout& L, int64_t gy, cudaStream_t s, c
return false;
} else {
if (g_old_kernels || split_off<TG>() || g_no_sub16_gu || L.n_embd != 2560 || L.n_ff % 32 != 0 || L.n_ff <= 0) return false;
- // the 16-lane rows assume 80 dots a row (as launch_gu): the 256-value K-quants have 160
- if (kq_type<TG> && (L.n_embd / Fmt<TG>::qk) * Fmt<TG>::ipb != 80) return false;
+ // the 16-lane rows assume 80 dots a row (as launch_gu): the 256-value K-quants and the APR trellis types (TQ2_T /
+ // TQK6 gate/up: qk 128, ipb 8) have 160 at n_embd 2560 and take launch_gu's full-warp multi kernel. Gyro-S (TQK6
+ // gate/up) went through here on every 12.0 card from 147-verify on: half of each gate/up row, looping answers.
+ if ((L.n_embd / Fmt<TG>::qk) * Fmt<TG>::ipb != 80) return false;
const dim3 grid((unsigned) (L.n_ff / 32), (unsigned) gy);
bool stage = false;
if constexpr (kStageIqGrid<TG>) stage = g_stage_grid && !((TG == 18 || TG == 21) && !stage_tables_on());