Skip to content

Graph Partitioning #20965

Answered by pranavsharma
kckeiks asked this question in General
Jun 7, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The partitioning algorithm is roughly as follows. (I'm intentionally skipping the finer details here). Code is here https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/framework/graph_partitioner.cc#L940.

for (e : prioritized list of EPs)
  e.GetCapability(onnx_graph) // gives this EP chance to mark nodes or return subgraphs it wants to claim (run)

The priority of EPs is the order in which uses register them with the session.
Unmarked nodes in the graph are assigned to CPU by default.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pranavsharma
Comment options

Answer selected by kckeiks
@kckeiks
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants