Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/triton.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21876a4bbaf371bcb83df8e6ee4f43a92f524dfe
0cace8d2336a9dc399effbb11522eea7f7b8c0b2
7 changes: 6 additions & 1 deletion torch/_inductor/codegen/triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,12 @@ def tan(x):
@staticmethod
@maybe_upcast_float32()
def tanh(x):
return f"libdevice.fast_tanhf({x})"
# On ROCm, always use fast_tanhf
# Requires ROCm fork of Triton 3.3, 3.4, 3.5 or upstream Triton 3.6+
if torch.version.hip:
return f"libdevice.fast_tanhf({x})"
else:
return f"libdevice.tanh({x})"

@staticmethod
@maybe_upcast_float32()
Expand Down