Skip to content

Add acceleration data structures to DynamicOpenDataflowGraph - #1692

Open
elliottslaughter wants to merge 6 commits into
flexflow:masterfrom
elliottslaughter:dodg-opt
Open

elliottslaughter wants to merge 6 commits into
flexflow:masterfrom
elliottslaughter:dodg-opt

Conversation

@elliottslaughter

@elliottslaughter elliottslaughter commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

To accelerate query operations on DynamicOpenDataflowGraph this 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 no friend functions 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_id bidict, 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 Reviewable

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.

1 participant