From e2e9416843874c6174d98b3f069693ed5a7519c7 Mon Sep 17 00:00:00 2001 From: mici81 Date: Wed, 4 Nov 2026 16:00:18 +0100 Subject: [PATCH] qwen4exp: chained launches pay with the MTP drafter The probe sets chain_pays, as the Gemma 4 DFlash drafter does, so the engine chains the speculative step's launches on the AQL backend (the chained forms of the previous commit). Co-Authored-By: Claude Opus 5.5 --- arch/qwen4exp_fp8/qwen4exp_fp8.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/qwen4exp_fp8/qwen4exp_fp8.cpp b/arch/qwen4exp_fp8/qwen4exp_fp8.cpp index 0856af99..d111352d 100644 --- a/arch/qwen4exp_fp8/qwen4exp_fp8.cpp +++ b/arch/qwen4exp_fp8/qwen4exp_fp8.cpp @@ -1766,6 +1766,11 @@ static int probe(const RadModelMeta* meta, RadArchProbe* out) { } /* The gated residual applies a control vector after every block's write (HcProject). */ out->control_vector_ok = 1; + /* Chained launches pay with the MTP drafter: the speculative step's small kernels wait on the + * previous one on the card instead of behind a queue barrier (libr4d/r4d_chain.h). On 2x R9700, + * sampled at temperature 1 with a 25k prompt, MTP depth 3, with the chained hc_read forms: + * 1/2/4/8/16 streams 174/291/458/657/851 -> 207/339/493/647/843 tok/s. */ + out->chain_pays = 1; return RAD_OK; }