Skip to content

Commit

Permalink
fix: Cast elimination (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
inisis authored Jan 23, 2025
1 parent 226ffcd commit 7ed146b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxslim/core/optimization/dead_node_elimination.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def dead_node_elimination(graph, is_subgraph=False):
if all(value == 0 for value in pad_value):
node.erase()
logger.debug(f"removing {node.op} op: {node.name}")
elif node.op == "Cast_":
elif node.op == "Cast":
inp_dtype = [dtype_to_onnx(input.dtype) for input in node.inputs][0]
if inp_dtype == node.attrs["to"]:
node.erase()
Expand Down

0 comments on commit 7ed146b

Please sign in to comment.