Skip to content

Fix SortGraph Removes Nodes Connected only to I/O#189

Merged
maltanar merged 4 commits intomainfrom
bugfix/sortgraph-removes-nodes-graph-io
Jun 17, 2025
Merged

Fix SortGraph Removes Nodes Connected only to I/O#189
maltanar merged 4 commits intomainfrom
bugfix/sortgraph-removes-nodes-graph-io

Conversation

@jsmonson
Copy link
Copy Markdown
Collaborator

The PR fixes a bug in the SortGraph transformation that removes nodes (that should be kept) that were only connected to graph inputs and outputs. The fix inserts code that checks for the node inputs for a connection to a graph input or initializer. If one is found than it inserts an empty dependency to prevent the node from being removed from the graph.

@maltanar
Copy link
Copy Markdown
Collaborator

Thanks @jsmonson for catching this! Adding a screenshot of the testcase raising the bug when the fix is not applied for reference sake:

Before:
image

After:
image

@maltanar maltanar merged commit 1d0a385 into main Jun 17, 2025
3 checks passed
@maltanar maltanar deleted the bugfix/sortgraph-removes-nodes-graph-io branch June 17, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants