Skip to content

Commit eea659c

Browse files
naromero77amdjataylo
authored andcommitted
Add PropagateNan argument to minimum and maximum function.
(cherry picked from commit 7eeb1ba)
1 parent 189481e commit eea659c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/_inductor/codegen/triton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,14 +1102,14 @@ def relu(x):
11021102
@staticmethod
11031103
def minimum(a, b):
11041104
if torch.version.hip:
1105-
return f"tl.minimum({a}, {b})"
1105+
return f"tl.minimum({a}, {b}, tl.PropagateNan.ALL)"
11061106
else:
11071107
return f"triton_helpers.minimum({a}, {b})"
11081108

11091109
@staticmethod
11101110
def maximum(a, b):
11111111
if torch.version.hip:
1112-
return f"tl.maximum({a}, {b})"
1112+
return f"tl.maximum({a}, {b}, tl.PropagateNan.ALL)"
11131113
else:
11141114
return f"triton_helpers.maximum({a}, {b})"
11151115

0 commit comments

Comments
 (0)