Repository navigation
Add acceleration data structures to DynamicOpenDataflowGraph - #1692
Open
elliottslaughter wants to merge 6 commits into
Open
elliottslaughter wants to merge 6 commits into
elliottslaughter wants to merge 6 commits into
Conversation
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.
To accelerate query operations on
DynamicOpenDataflowGraphthis PR adds some acceleration data structures, computed in the constructor of the dynamic graph. The graph becomes a regular C++ class instead of DTG so that we can maintain the consistency of these structures. Otherwise, this preserves the existing dynamic graph structure: functions remain functions outside of the class and we have nofriendfunctions here, so everything else lives outside of the encapsulation boundary of the class. This does make certain parts of the code slightly screwy: e.g., the functions to build the dynamic value sets and check graph validity live outside the class itself but get called inside the constructor.Uses unordered bidicts (#1690) for the acceleration structures because
operator<on these large structures is extremely expensive, and a naive ordered bidict version of this PR is actually slower than the baseline.I'd originally been planning on removing the invocation set entirely and replacing it with the
invocations_by_idbidict, but the code really wants sets, so it makes sense to keep it around, which also has the advantage that we can retain ordering on the dynamic graph for users who want that.This change is