Skip to content

Commit 768ab84

Browse files
committed
Add PropagateNan argument to minimum and maximum function.
(cherry picked from commit 7eeb1ba) (cherry picked from commit eea659c)
1 parent 0a9dcdd commit 768ab84

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
@@ -1003,14 +1003,14 @@ def relu(x):
10031003
@staticmethod
10041004
def minimum(a, b):
10051005
if torch.version.hip:
1006-
return f"tl.minimum({a}, {b})"
1006+
return f"tl.minimum({a}, {b}, tl.PropagateNan.ALL)"
10071007
else:
10081008
return f"triton_helpers.minimum({a}, {b})"
10091009

10101010
@staticmethod
10111011
def maximum(a, b):
10121012
if torch.version.hip:
1013-
return f"tl.maximum({a}, {b})"
1013+
return f"tl.maximum({a}, {b}, tl.PropagateNan.ALL)"
10141014
else:
10151015
return f"triton_helpers.maximum({a}, {b})"
10161016

0 commit comments

Comments
 (0)