From 4a2f31171815d19eb32fe80c5c9c55627e0de112 Mon Sep 17 00:00:00 2001 From: "G. Ramalingam" Date: Fri, 2 Aug 2024 10:48:53 -0700 Subject: [PATCH] Update onnxscript/rewriter/pattern.py Co-authored-by: Justin Chu --- onnxscript/rewriter/pattern.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onnxscript/rewriter/pattern.py b/onnxscript/rewriter/pattern.py index d58cb7201..87544874d 100644 --- a/onnxscript/rewriter/pattern.py +++ b/onnxscript/rewriter/pattern.py @@ -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):