Support networkx 3.6 and 3.7 - #2634
Open
ThrudPrimrose wants to merge 2 commits into
Open
ThrudPrimrose wants to merge 2 commits into
ThrudPrimrose wants to merge 2 commits into
Conversation
added 2 commits
October 2, 2026 01:52
networkx 3.6 no longer includes the start node (mapped to itself) in the result of immediate_dominators. DaCe indexes the dominator of every block and walks the dominator tree until a block is its own dominator, so code generation failed with a KeyError (block_parent_tree, called from determine_allocation_lifetime) and loop detection, control flow raising and the symbol/scalar analyses broke the same way. Add sdutil.immediate_dominators, which always maps the start node to itself, and use it at every dominator and postdominator call site. Drop the networkx<=3.5 pin from pyproject.toml and lock networkx 3.4.2 on Python 3.10, 3.6.1 on 3.11 and 3.7 on 3.12 and later, so CI exercises both the old and the new behaviour.
tbennun
approved these changes
Oct 2, 2026
tbennun
left a comment
Collaborator
There was a problem hiding this comment.
The tests are probably not necessary but they’re good for problem diagnosis
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
networkx 3.6 stopped mapping the start node to itself in immediate_dominators, which broke code generation with a KeyError; a single helper restores that mapping at every dominator call site and works on all networkx versions. The networkx upper bound is lifted, and uv.lock resolves 3.4.2 on Python 3.10, 3.6.1 on 3.11 and 3.7 on 3.12+, so CI exercises both behaviours.