diff --git a/cpp_engine/tests/bench_qwen_gqa_prefill.cpp b/cpp_engine/tests/bench_qwen_gqa_prefill.cpp index 3133f1b5..f5dd247d 100644 --- a/cpp_engine/tests/bench_qwen_gqa_prefill.cpp +++ b/cpp_engine/tests/bench_qwen_gqa_prefill.cpp @@ -55,11 +55,11 @@ double time_case(int rows, int position_offset, int max_context, int iters, // baseline explicit so this benchmark cannot compare hpg6 against itself. setenv("DSV4_QWEN_GQA_LONG_TILE", mode == Mode::Base ? "0" : "1", 1); unsetenv("DSV4_QWEN_GQA_FLASH_TILE"); - unsetenv("DSV4_QWEN_GQA_MMA_TILE"); if (mode == Mode::Flash) setenv("DSV4_QWEN_GQA_FLASH_TILE", "1", 1); - // The MMA dispatch is checked before flash and long, so this one variable - // selects it regardless of the others. - if (mode == Mode::Mma) setenv("DSV4_QWEN_GQA_MMA_TILE", "1", 1); + // MMA is the production default and is dispatched before flash and long, so + // unsetting its variable would silently run MMA for every mode and make all + // four rows identical. It has to be switched off explicitly instead. + setenv("DSV4_QWEN_GQA_MMA_TILE", mode == Mode::Mma ? "1" : "0", 1); std::vector host_q(q_elements); std::vector host_kv(kv_elements, 0); for (uint16_t& value : host_q) {