From 9db573a6d3e7c585c1cadfb3c890cd968eec43fe Mon Sep 17 00:00:00 2001 From: qazal Date: Mon, 15 Jun 2026 16:23:37 +0800 Subject: [PATCH] compute --- extra/thunder/amd/gemm_fp8.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/thunder/amd/gemm_fp8.cpp b/extra/thunder/amd/gemm_fp8.cpp index ee1ae91e84..99e58118a7 100644 --- a/extra/thunder/amd/gemm_fp8.cpp +++ b/extra/thunder/amd/gemm_fp8.cpp @@ -358,7 +358,8 @@ __global__ __launch_bounds__(512, 2) void hk_fp8_gemm(bf16 *C_ptr, fp8e4m3 *A_pt scale *= *w_scale_ptr; #endif #if SCALE_MODE & 4 - scale *= *g_scale_ptr; + float g_scale = (*g_scale_ptr + 1e-08f) * (1.0f / 448.0f); + scale *= *g_scale; #endif mul(cA, cA, scale);