Add Graph Execution to host_build_graph#1444
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughWalkthroughAdds host-side graph capture and replay for ChangesGraph Execution Runtime
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fd8fc05 to
66f183e
Compare
- Cache repeated task DAGs with saved topology and dynamic TaskArgs sources - Submit one Graph task on cache hits and expand nodes in the device Scheduler - Reuse compact host submissions and graph-affine AICPU execution blocks - Add Graph/Host-Orchestrator DFX lanes, simulation coverage, and Qwen API docs - Fix predicate-field compatibility in a2a3/a5 runtime builds Co-authored-by: Crane-Liu <c.wliu@outlook.com>
Summary
host_build_graphruntime;fanin/fanout, roots, argument sources, and static scalars;
GRAPHtask from the host Orchestrator on a cache hit, then letthe device Scheduler materialize and execute the saved topology;
L2TaskArgsAPI,without public GraphBindings, Patch, or GraphArgs types;
submission and graph-affine AICPU execution pools;
graph_prepareDFX lanes;Qwen3-14B-style upstream integration example.
Execution flow
ordinary task submits and save the complete DAG definition.
GRAPHdescriptor containing acompact definition and the current
L2TaskArgsvalues.per scheduling slice, activates the saved roots, and releases saved fanout
edges as nodes complete.
downstream dependencies retain normal task semantics.
Upstream API: Qwen decoder layer
The caller packages hidden state, weights, output,
layer_id, andtoken_positionintoL2TaskArgs; the wrapper does not repeat them in itssignature. The function pointer is the Graph ID for structurally identical
layers. Tensor addresses and scalar values may change; tensor shape, dtype,
stride, size, direction, and task topology must remain compatible. See
GRAPH_EXECUTION.mdfor the complete three-layer Qwen-style example and current limitations.
Scope
upstream/main;host_build_graph;tensormap_and_ringbufferchanges are API-plumbing compatibility and twopredicate-field build fixes, not Graph Execution enablement.
Testing
python simpler_setup/build_runtimes.py --platforms a2a3sim a5sim;a2a3sim:1 passed;24 passed;host_build_graphsimulation:12 passed, 1 deselected;task_submit, cache-hitgraph_submit, Schedulergraph_prepare, and Graph Execution lanes.