Skip to content

Commit 3d4f554

Browse files
committed
Fix duplicated input node issue in TensorRT 8.6 ONNX export
Signed-off-by: Phoenix <[email protected]>
1 parent c0c633c commit 3d4f554

File tree

1 file changed

+1
-1
lines changed
  • tools/onnx-graphsurgeon/examples/04_modifying_a_model

1 file changed

+1
-1
lines changed

‎tools/onnx-graphsurgeon/examples/04_modifying_a_model/modify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
# Therefore, you should only need to sort the graph when you have added new nodes out-of-order.
4444
# In this case, the identity node is already in the correct spot (it is the last node,
4545
# and was appended to the end of the list), but to be on the safer side, we can sort anyway.
46-
graph.cleanup().toposort()
46+
graph.cleanup(remove_unused_graph_inputs=True).toposort()
4747

4848
onnx.save(gs.export_onnx(graph), "modified.onnx")

0 commit comments

Comments
 (0)