From df4e2ea889b66c0a8280ebc944411cc9799ed965 Mon Sep 17 00:00:00 2001 From: Asim Siddiqui Date: Thu, 5 Nov 2026 18:25:33 +1100 Subject: [PATCH] ref_test: sweep geometries for w4a8/w4a4 moe_gemm_q and the dequant_w4 zero-point arm Four moe_gemm_q geometries (dtype w4a8 and w4a4, token- and sorted-order a) so the w4a8/w4a4 reference GEMMs run against the kernels, and a dequant_w4 geometry at K=128/group=128 with twos=0 for the zero-point decode arm. --- tests/ref_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/ref_test.cpp b/tests/ref_test.cpp index 650715d6..decf28af 100644 --- a/tests/ref_test.cpp +++ b/tests/ref_test.cpp @@ -10358,6 +10358,8 @@ std::vector geometries() { G("dequant", "M", 3, a.i("M", R).i("n", 32).i("group", 16).s("dtype", "f32")), G("dequant_w4", "N", 16, a.i("N", R).i("K", 64).i("group", 64).i("twos", 1) .s("dtype", "w4a8")), + G("dequant_w4", "N", 16, a.i("N", R).i("K", 128).i("group", 128).i("twos", 0) + .s("dtype", "w4a8")), G("rmsnorm_quant_fp8", "M", 3, a.i("M", R).i("n", 32).d("eps", 1e-6).i("group", 16) .s("dtype", "bf16")), G("gated_quant_fp8", "M", 3, a.i("M", R).i("n", 32).i("group", 16).s("dtype", "bf16") @@ -10445,6 +10447,14 @@ std::vector geometries() { .s("a_order", "token").s("dtype", "f32")), G("moe_gemm_q", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 4).i("top_k", 2) .i("group", 128).s("a_order", "token").s("dtype", "fp8a8")), + G("moe_gemm_q", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 4).i("top_k", 2) + .i("group", 128).s("a_order", "token").s("dtype", "w4a8")), + G("moe_gemm_q", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 4).i("top_k", 2) + .i("group", 128).s("a_order", "sorted").s("dtype", "w4a8")), + G("moe_gemm_q", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 4).i("top_k", 2) + .i("group", 128).s("a_order", "token").s("dtype", "w4a4")), + G("moe_gemm_q", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 4).i("top_k", 2) + .i("group", 128).s("a_order", "sorted").s("dtype", "w4a4")), G("moe_gemm_q_mod4", "M", 3, a.i("M", R).i("N", 16).i("K", 128).i("n_expert", 5) .i("top_k", 2).i("group", 128).s("a_order", "sorted") .s("dtype", "fp8a8")),