-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ambiguous_with
breaking run conditions
#9253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Your assessment seems correct to me. Even though it's very subtle, I'm a little surprised this bug went unnoticed until now. Thank you for solving this so quickly.
Good fix. Can you add a regression test to make sure this doesn't resurface? |
Example |
The failed example is from a commit I've accidentally pushed with the regression test commit, if anyone wonders. |
# Objective - Fixes #9114 ## Solution Inside `ScheduleGraph::build_schedule()` the variable `node_count = self.systems.len() + self.system_sets.len()` is used to calculate the indices for the `reachable` bitset derived from `self.hierarchy.graph`. However, the number of nodes inside `self.hierarchy.graph` does not always correspond to `self.systems.len() + self.system_sets.len()` when `ambiguous_with` is used, because an ambiguous set is added to `system_sets` (because we need an `NodeId` for the ambiguity graph) without adding a node to `self.hierarchy`. In this PR, we rename `node_count` to the more descriptive name `hg_node_count` and set it to `self.hierarchy.graph.node_count()`. --------- Co-authored-by: James Liu <contact@jamessliu.com>
Objective
ambiguous_with
breaks run conditions #9114Solution
Inside
ScheduleGraph::build_schedule()
the variablenode_count = self.systems.len() + self.system_sets.len()
is used to calculate the indices for thereachable
bitset derived fromself.hierarchy.graph
. However, the number of nodes insideself.hierarchy.graph
does not always correspond toself.systems.len() + self.system_sets.len()
whenambiguous_with
is used, because an ambiguous set is added tosystem_sets
(because we need anNodeId
for the ambiguity graph) without adding a node toself.hierarchy
.In this PR, we rename
node_count
to the more descriptive namehg_node_count
and set it toself.hierarchy.graph.node_count()
.