From b12cca6a2352ea6926864c925246eeb581be8caa Mon Sep 17 00:00:00 2001 From: XuZhou <17717803682@163.com> Date: Fri, 10 Jul 2026 21:55:28 +0800 Subject: [PATCH] [Bugfix] Fix turboquant FP8 cast failure for BF16 models on Ampere GPUs (#39988) Signed-off-by: Xu Zhou Co-authored-by: Xu Zhou Co-authored-by: Hoseung Kim --- vllm/v1/attention/ops/triton_turboquant_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/v1/attention/ops/triton_turboquant_store.py b/vllm/v1/attention/ops/triton_turboquant_store.py index 3ad2d41488..d5437d7314 100644 --- a/vllm/v1/attention/ops/triton_turboquant_store.py +++ b/vllm/v1/attention/ops/triton_turboquant_store.py @@ -188,7 +188,7 @@ def _tq_fused_store_fp8( # ── FP8 KEY: cast to FP8 in-kernel and store ───────────────── d_offs = tl.arange(0, BLOCK_D) d_mask = d_offs < D - k_vals = tl.load(Key_ptr + base + d_offs, mask=d_mask, other=0.0) + k_vals = tl.load(Key_ptr + base + d_offs, mask=d_mask, other=0.0).to(tl.float32) k_fp8 = k_vals.to(tl.float8e4b15) if FP8_E4B15 else k_vals.to(tl.float8e4nv) k_bytes = k_fp8.to(tl.uint8, bitcast=True) tl.store(KV_cache_ptr + slot_base + d_offs, k_bytes, mask=d_mask)