Skip to content
Open
Changes from all 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
4 changes: 2 additions & 2 deletions esp_ppq/parser/espdl/layout_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def export(self, op: Operation, graph: BaseGraph, **kwargs) -> Operation:

out_var_perm = var_perm[:]
if op.type in REDUCE_OP_SET:
keepdims = op.attributes["keepdims"]
keepdims = bool(op.attributes.get("keepdims", 1))
# The perm needs to be deleted.
if keepdims == 0:
if not keepdims:
if len(op.inputs) > 1 and len(op.inputs[1].value) > 0:
reduce_axes_list = sorted(op.inputs[1].value.tolist(), reverse=True)
# After the transformations above, the axes now match the current input.
Expand Down