Skip to content

Commit

Permalink
fix subgraph unintended input elimination
Browse files Browse the repository at this point in the history
  • Loading branch information
inisis committed Oct 16, 2024
1 parent d8061d0 commit f6c77ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onnxslim/third_party/onnx_graphsurgeon/ir/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def cleanup_subgraphs():
subgraph.cleanup(
remove_unused_node_outputs=remove_unused_node_outputs,
recurse_subgraphs=recurse_subgraphs,
remove_unused_graph_inputs=remove_unused_graph_inputs,
remove_unused_graph_inputs=False,
recurse_functions=False, # Only cleanup functions once
)

Expand Down Expand Up @@ -435,7 +435,7 @@ def cleanup_subgraphs():
if inp in used_tensors or not remove_unused_graph_inputs:
inputs.append(inp)
else:
G_LOGGER.ultra_verbose(f"Removing unused input: {inp}")
G_LOGGER.debug(f"Removing unused input: {inp}")
self.inputs = inputs

nodes = []
Expand Down Expand Up @@ -645,7 +645,7 @@ def add_to_tensor_map(tensor):

if check_duplicates:
G_LOGGER.critical(msg)
G_LOGGER.warning(msg)
# G_LOGGER.warning(msg)

tensor_map[tensor.name] = tensor

Expand Down

0 comments on commit f6c77ac

Please sign in to comment.