Skip to content

Commit e50aca5

Browse files
YufengShi-duduArmRyanrobell
committed
Arm backend: Match arg ranks for min/max ops
- Int32 clamp is decomposed into min/max, but the inputs can have mismatched ranks, which violates the TOSA spec of TOSA.MINIMUM and TOSA.MAXIMUM. - Fix this by matching the input ranks in MatchArgRanksPass Change-Id: I47a3bb73832ddc35553cd3e5b65085155eb9ca48 Signed-off-by: Yufeng Shi <yufeng.shi@arm.com> Co-authored-by: Ryan O'Shea <ryan.oshea3@arm.com> Co-authored-by: Rob Elliott <Robert.Elliott@arm.com>
1 parent c398ff4 commit e50aca5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backends/arm/_passes/match_arg_ranks_pass.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def __init__(self, exported_program: ExportedProgram) -> None:
6363
exir_ops.edge.aten.bitwise_and.Tensor,
6464
exir_ops.edge.aten.bitwise_xor.Tensor,
6565
exir_ops.edge.aten.bitwise_or.Tensor,
66+
exir_ops.edge.aten.maximum.default,
67+
exir_ops.edge.aten.minimum.default,
6668
]
6769

6870
def _match_op_rank(self, graph_module, node, arg, max_rank):

0 commit comments

Comments
 (0)