diff --git a/tools/ci/hrx_f16_narrowing.py b/tools/ci/hrx_f16_narrowing.py index 4d4034a0f..f4a9ec71b 100755 --- a/tools/ci/hrx_f16_narrowing.py +++ b/tools/ci/hrx_f16_narrowing.py @@ -24,7 +24,9 @@ This is the ratchet: - * every .loom body that narrows f32 to f16 (`f32 to f16` or `truncf`) is listed in + * every .loom body that narrows f32 to f16 -- by the `fptrunc` op, the scalar `truncf` spelling, or an + `f32 to f16` type line, which covers both the scalar and the `vector to vector` forms -- is + listed in tools/ci/hrx_f16_narrowing.txt, and a body that appears without a line, or a line whose body is gone, fails the check -- the two arms a ratchet needs (a list that can only grow cannot see a rename, engine#1728's lesson); @@ -45,7 +47,12 @@ CORPUS = pathlib.Path("third_party/llama.cpp/ggml/src/ggml-hrx/kernel-corpus/kernels") BASELINE = pathlib.Path("tools/ci/hrx_f16_narrowing.txt") -NARROW = ("f32 to f16", "truncf") +# engine#2219: `truncf` and `f32 to f16` between them miss `vector.fptrunc %v : vector<4xf32> to vector<4xf16>` +# -- the vector spelling contains neither `truncf` (it is `fptrunc`) nor `f32 to f16` (the types are wrapped in +# `vector`). At pin 2b7960bae that form is 132 of the 233 fptrunc lines and 27 of the 52 narrowing bodies, +# so the ratchet was listing 25 of 52 and reporting "none new, none stale". `fptrunc` is LLVM's narrowing op and +# covers both spellings; the other markers stay because a hand-written or vendor file may use them without it. +NARROW = ("fptrunc", "truncf", "f32 to f16") GUARD = ("scale_log2", "prescale") diff --git a/tools/ci/hrx_f16_narrowing.txt b/tools/ci/hrx_f16_narrowing.txt index b7e67e613..c724c7073 100644 --- a/tools/ci/hrx_f16_narrowing.txt +++ b/tools/ci/hrx_f16_narrowing.txt @@ -21,21 +21,47 @@ # perfectly correct. What the list buys is that a NEW narrowing body cannot appear without someone # writing it down and saying what feeds it -- and that is the open question on engine#1962: which of # these are protected by a producer-side prescale cannot be answered by reading them. +loom-libs/motifs/bf16_f16.loom +loom-libs/motifs/dequant.loom +loom-libs/motifs/dequant_1bit.loom +loom-libs/motifs/dequant_prism.loom +loom-libs/motifs/f32_f16.loom +loom-libs/motifs/llm_attention_qkv_matmul_postops.loom +loom-libs/motifs/mul_mat_f32_f32_wmma_core.loom loom-libs/motifs/mul_mat_id_f16_f16_wmma_core.loom +loom-libs/motifs/mul_mat_id_f32_f32_wmma_core.loom loom-libs/motifs/mul_mat_id_q4k_f16_wmma_projection.loom loom-libs/motifs/mul_mat_id_q5k_f16_wmma_projection.loom +loom-libs/motifs/mul_mat_id_q6k_f16_wmma_projection.loom +loom-libs/motifs/mul_mat_id_swiglu_f16_f16_accumulate.loom +loom-libs/motifs/mul_mat_id_swiglu_f16_f16_wmma_body.loom +loom-libs/motifs/mul_mat_quantized_f16_prefill.loom +loom-libs/motifs/publish_f32.loom loom-libs/motifs/q4_k_f16.loom +loom-libs/motifs/q6_k_f16.loom +loom-libs/motifs/q8_0_f16.loom +loom-libs/motifs/q8_1_f16.loom loom-libs/motifs/quantize_q8_1_x4.loom loom-libs/motifs/unary_f32_apply.loom +loom-libs/ops/copy_f32.loom loom-libs/ops/flash_attention_decode_split_f32_f16_wmma.loom loom-libs/ops/flash_attention_f32_f16_wmma.loom loom-libs/ops/gated_delta_net_f32_wmma.loom +loom-libs/ops/llm_attention_k_matmul_rope_set_rows_decode_f32_f32.loom loom-libs/ops/llm_attention_v_matmul_set_rows_decode_f32_f32.loom +loom-libs/ops/mul_mat_id_swiglu_f32_f32_wmma.loom +loom-libs/ops/mul_mat_q6_k_packed_f16_wmma.loom +loom-libs/ops/mul_mat_swiglu_f32_f32_wmma.loom loom-libs/ops/mul_mat_swiglu_symmetric_i4_wmma.loom +loom-libs/ops/mul_mat_symmetric_i4_wmma.loom loom-libs/ops/mul_mat_symmetric_i8_wmma.loom +loom-libs/ops/rmsnorm_binary_f32.loom +loom-libs/ops/rope_set_rows_f32.loom loom-libs/ops/set_rows.loom loom-libs/ops/small_rows_f32.loom +qwen_moe/ggml/linear_q6k_q8_1_x4.loom qwen_moe/ggml/quantize_q8_1_x4.loom +qwen_moe/qwen3_moe/attention_postprocess_f32_f16.loom qwen_moe/qwen3_moe/attention_prepare_quantized.loom qwen_moe/qwen3_moe/dense_linear_quantized_f16_wmma.loom qwen_moe/qwen3_moe/flash_attention_decode_f32_f16_wmma.loom @@ -43,6 +69,7 @@ qwen_moe/qwen3_moe/flash_attention_decode_q128_f32_f16_wmma.loom qwen_moe/qwen3_moe/flash_attention_decode_split_f32_f16_wmma.loom qwen_moe/qwen3_moe/flash_attention_decode_split_next_q8_test.loom qwen_moe/qwen3_moe/flash_attention_f32_f16_wmma.loom +qwen_moe/qwen3_moe/routed_down_quantized_f16_wmma.loom qwen_moe/qwen3_moe/routed_down_weighted_reduce_next_rmsnorm_q8_1_x4.loom qwen_moe/qwen3_moe/routed_gate_up_swiglu_q4k.loom qwen_moe/qwen3_moe/routed_linear_q4k_f16_wmma.loom