Skip to content

Commit 6c9047a

Browse files
jataylopragupta
authored andcommitted
[SWDEV-539119] [release/2.8] Add fast_tanh support (#2484)
Perf improvement for triton tanh (cherry picked from commit 4febbd8)
1 parent 5343942 commit 6c9047a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5e5685356b9fc7b5ad9cdf4e510a1994a5b8601a
1+
6581064e5be2ac4ab0c198c1bb0e533a1900bbe3

torch/_inductor/codegen/triton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ def tan(x):
13061306
@staticmethod
13071307
@maybe_upcast_float32()
13081308
def tanh(x):
1309-
return f"libdevice.tanh({x})"
1309+
return f"libdevice.fast_tanhf({x})"
13101310

13111311
@staticmethod
13121312
@maybe_upcast_float32()

0 commit comments

Comments
 (0)