Skip to content

Commit

Permalink
fix tensor copy bug and skip some constant folding (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
inisis authored Dec 18, 2024
1 parent 7ff3969 commit 9a71a41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions onnxslim/third_party/onnx_graphsurgeon/ir/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ def is_foldable(node):
"QuantizeLinear",
"DequantizeLinear",
"DynamicQuantizeLinear",
"SequenceEmpty",
}
if node.op in NO_FOLD_OPS:
return False
Expand Down
2 changes: 1 addition & 1 deletion onnxslim/third_party/onnx_graphsurgeon/ir/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def copy(self):
Note: Generally, you should only ever make a copy of a Graph.
"""
return Variable(self.name, self.dtype, self.shape)
return Variable(self.name, self.dtype, self.shape, self.type)

def __eq__(self, other):
"""Perform a check to see if two variables are equal."""
Expand Down

0 comments on commit 9a71a41

Please sign in to comment.