Skip to content

Commit

Permalink
Update onnxscript/rewriter/pattern.py
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Chu <[email protected]>
  • Loading branch information
gramalingam and justinchuby authored Aug 2, 2024
1 parent efb99ea commit 4a2f311
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxscript/rewriter/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,11 @@ def clone(self, node_map: dict[NodePattern, NodePattern], swap: bool) -> NodePat
), "Internal error: commutative swap applies only to binary ops."
inputs = [inputs[1], inputs[0]]
outputs = [value.name for value in self.outputs]
copy = NodePattern(
copied = NodePattern(
self.domain, self.op, inputs, self.attributes, outputs, self.allow_other_attributes
)
node_map[self] = copy
return copy
node_map[self] = copied
return copied


class NodeOutputPattern(ValuePattern):
Expand Down

0 comments on commit 4a2f311

Please sign in to comment.