Skip to content

Support networkx 3.6 and 3.7 - #2634

Open
ThrudPrimrose wants to merge 2 commits into
mainfrom
networkx-3.7-support
Open

ThrudPrimrose wants to merge 2 commits into
mainfrom
networkx-3.7-support

Conversation

@ThrudPrimrose

Copy link
Copy Markdown
Collaborator

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.

Yakup Koray Budanaz 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.
@ThrudPrimrose
ThrudPrimrose requested a review from tbennun October 2, 2026 00:19

@tbennun tbennun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are probably not necessary but they’re good for problem diagnosis

This branch has not been deployed

No deployments
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