From 7316a44ff3310ddb331cb1af63c4d5f7ac0294db Mon Sep 17 00:00:00 2001 From: Qianfeng Zhang Date: Mon, 21 Apr 2025 14:39:42 +0000 Subject: [PATCH] Update exp() in ck_tile/core/numeric/math.hpp to use __expf --- include/ck_tile/core/numeric/math.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/ck_tile/core/numeric/math.hpp b/include/ck_tile/core/numeric/math.hpp index 6bdcb509b0..56931fe795 100644 --- a/include/ck_tile/core/numeric/math.hpp +++ b/include/ck_tile/core/numeric/math.hpp @@ -1359,7 +1359,8 @@ CK_TILE_DEVICE T rcp(T x) template CK_TILE_DEVICE T exp(T x) { - return type_convert(__ocml_exp_f32(type_convert(x))); + // __expf in llvm using __builtin_amdgcn_exp2f, which is very fast + return type_convert(__expf(type_convert(x))); }; template <> @@ -1371,7 +1372,8 @@ CK_TILE_DEVICE fp16_t exp(fp16_t x) template <> CK_TILE_DEVICE float exp(float x) { - return __ocml_exp_f32(x); + // __expf in llvm using __builtin_amdgcn_exp2f, which is very fast + return __expf(x); }; template <>