Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NewIR] No.19 Migrate paddle.reduce_max into pir #57123

Merged
merged 6 commits into from
Sep 14, 2023
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 python/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ def max(x, axis=None, keepdim=False, name=None):
[1., 1.]]])
"""

if in_dynamic_mode():
if in_dynamic_or_new_ir_mode():
PommesPeter marked this conversation as resolved.
Show resolved Hide resolved
return _C_ops.max(x, axis, keepdim)
else:
reduce_all, axis = _get_reduce_axis_with_tensor(axis, x)
Expand Down
3 changes: 3 additions & 0 deletions test/legacy_test/test_reduce_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def calc_output(self):
def test_check_output(self):
self.check_output()

def test_check_output_new_ir(self):
PommesPeter marked this conversation as resolved.
Show resolved Hide resolved
self.check_output(check_new_ir=True)

def test_check_grad(self):
self.check_grad(['X'], 'Out', check_prim=True)

Expand Down