From 079f7e3a03dbec7e5e9f0f5aa4bd22f2f8da214b Mon Sep 17 00:00:00 2001 From: Qianfeng Zhang Date: Wed, 7 May 2025 07:05:43 +0000 Subject: [PATCH] Use type_convert rather than static_cast in f_silu --- .../ck_tile/18_hstu_attention/hstu_attention_fwd_pipeline.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ck_tile/18_hstu_attention/hstu_attention_fwd_pipeline.hpp b/example/ck_tile/18_hstu_attention/hstu_attention_fwd_pipeline.hpp index 7e6a74564a..51c1068bdb 100644 --- a/example/ck_tile/18_hstu_attention/hstu_attention_fwd_pipeline.hpp +++ b/example/ck_tile/18_hstu_attention/hstu_attention_fwd_pipeline.hpp @@ -239,11 +239,11 @@ struct HstuAttentionFwdPipelineQRKSVS if constexpr(std::is_same_v) { x = x * __builtin_amdgcn_rcpf(neg_one - __expf(x)) * - __builtin_amdgcn_rcpf(static_cast(max_seqlen)); + __builtin_amdgcn_rcpf(type_convert(max_seqlen)); } else { - x = x / (neg_one - exp(x)) / static_cast(max_seqlen); + x = x / (neg_one - exp(x)) / type_convert(max_seqlen); } };