Skip to content

Add DynamicOpenDataflowGraph acceleration data structures - #1671

Draft
elliottslaughter wants to merge 6 commits into
flexflow:masterfrom
elliottslaughter:dodg-value-lookup
Draft

Add DynamicOpenDataflowGraph acceleration data structures#1671
elliottslaughter wants to merge 6 commits into
flexflow:masterfrom
elliottslaughter:dodg-value-lookup

Conversation

@elliottslaughter

@elliottslaughter elliottslaughter commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Definitely not in a final state yet, but sending this draft PR to show what I'm doing to accelerate the DynamicOpenDataflowGraph value lookup data structures.

TODO:

  • Refactor DynamicOpenDataflowGraph as a proper class and encapsulate its implementation

Notes to self:

  • Ordered set/map are ferociously slow due to large keys (DynamicNodeInvocation/DynamicValueAttrs). This is, strictly speaking, a constant factor, but it's massive: > 10x in some cases. The larger and more important issues are reducing the number of calls to operator< via better algorithms, but it's worth keeping in mind that e.g., a naive bidict<dynamic_node_invocation_id_t, DynamicNodeInvocation> is by itself a 6x slowdown if you aren't careful.
  • Almost everything else here is of the flavor "O(N^2) is catastrophic, switch to an O(N) algorithm". The constant factors are particularly bad because of the above but almost anything will dominate in an O(N^2) algorithm when N is sufficiently large.

This change is Reviewable

@elliottslaughter elliottslaughter changed the title Add DynamicOpenDataflowGraph acceleration data structures for value lookup Add DynamicOpenDataflowGraph acceleration data structures Sep 3, 2026
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