Revert "Update exp() in ck_tile/core/numeric/math.hpp to use __expf"

This reverts commit 7316a44ff3.
This commit is contained in:
Qianfeng Zhang
2025-04-25 14:42:33 +00:00
parent 80677eb6e0
commit 4ae9acd712

View File

@@ -1359,8 +1359,7 @@ CK_TILE_DEVICE T rcp(T x)
template <typename T>
CK_TILE_DEVICE T exp(T x)
{
// __expf in llvm using __builtin_amdgcn_exp2f, which is very fast
return type_convert<T>(__expf(type_convert<float>(x)));
return type_convert<T>(__ocml_exp_f32(type_convert<float>(x)));
};
template <>
@@ -1372,8 +1371,7 @@ CK_TILE_DEVICE fp16_t exp<fp16_t>(fp16_t x)
template <>
CK_TILE_DEVICE float exp<float>(float x)
{
// __expf in llvm using __builtin_amdgcn_exp2f, which is very fast
return __expf(x);
return __ocml_exp_f32(x);
};
template <>