From 13f9679dd5b6041b3d927bf984dae81637a56eec Mon Sep 17 00:00:00 2001 From: Jack Taylor <108682042+jataylo@users.noreply.github.com> Date: Wed, 13 Aug 2025 18:03:35 +0100 Subject: [PATCH] [SWDEV-539119] [rocm7.1_internal_testing] Add fast_tanh support Cherry picked from https://github.com/ROCm/pytorch/pull/2484 --- torch/_inductor/codegen/triton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/_inductor/codegen/triton.py b/torch/_inductor/codegen/triton.py index b125efd6bdbfe..58cc7cedd1fb1 100644 --- a/torch/_inductor/codegen/triton.py +++ b/torch/_inductor/codegen/triton.py @@ -1250,7 +1250,7 @@ def tan(x): @staticmethod @maybe_upcast_float32() def tanh(x): - return f"libdevice.tanh({x})" + return f"libdevice.fast_tanhf({x})" @staticmethod @maybe_upcast_float32()