Skip to content

samples.research.model_computation_graph_generation.dot_dispatch_parser

Source: samples/research/model_computation_graph_generation/dot_dispatch_parser.py

samples.research.model_computation_graph_generation.dot_dispatch_parser

Post-process IREE dispatch graph (.dot) to extract dependencies between async dispatches. Uses pydot to read the dot file and keeps only nodes that correspond to @...$async_dispatch_. Outputs a JSON summary and prints a readable dependency list.

build_dispatch_mapping(graph)

Return mapping from node name (v42) to unique dispatch key, including subgraphs. If multiple nodes share the same async_dispatch_, they receive suffixes _1, _2, ... Example: dispatch_13_1, dispatch_13_2.

extract_dependencies(graph, node_to_key)

Return adjacency list of dispatch dependencies (including paths via non-dispatch nodes).

render_png(deps, png_path)

Render a DAG PNG from dependency dict.