vxpu/plan: say in the plan how each segment runs and derive packages and pass-through #832
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 452 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #832"
general
weight: 0.35
codebot-robot
vxpu/proto: say in the plan how each segment runs
Define the SegmentRun enum and run field on Segment in plan.proto.
SegmentRun defines how a segment of the execution graph executes:
compilation. Host segments always have this value because host
operations execute eagerly. Pass-through models (such as tiny Llama)
have this value on every segment.
torch.compile. This is what the engine on main does by default when
compiling dense segments (plan.py:651-674).
called directly without CUDA graph capture, for dense segments on CPU
(VXPU_SEGMENT_RUNTIME="aoti").
captured into a per-segment CUDA graph, for dense segments on GPU
targets (such as NVIDIA L4, VXPU_SEGMENT_RUNTIME="aoti" and
VXPU_SEGMENT_GRAPH=True).
The planner decides each segment's run mode for the machine the plan
targets; the executor builds each segment's callable from this value and
nothing else. Today the executor reads switches in Python instead
(VXPU_SEGMENT_RUNTIME, VXPU_SEGMENT_GRAPH, and VXPU_SPLIT_COMPILE in
vxpu/python/vxpu/plan.py), which a later move replaces once the plan is
carried on load.
Regenerate Go and Python protobuf bindings.
***
vxpu/plan: derive required packages and pass-through from segment run mode
Specify in the plan how each segment runs, decide it during plan emit,
and derive required compiled packages and pass-through status from it:
machine the plan targets solely decides the device, and set each
segment's run mode via kernelplan.DecideSegmentRun:
- A model with no call sites of our operations (such as tiny Llama)
is passed through, every segment running as plain torch
(SEGMENT_RUN_PLAIN_TORCH), which is the planner's choice for a model
it has nothing to offer.
- For any other model (such as tiny DeepSeek), every non-host segment
runs from an ahead-of-time compiled package, captured into a CUDA graph
(SEGMENT_RUN_CAPTURED) when the plan targets a GPU machine (such as
NVIDIA L4) and directly called (SEGMENT_RUN_PACKAGE) on a CPU machine.
- Host segments always run as plain torch (SEGMENT_RUN_PLAIN_TORCH).
once in Go. A plan is pass-through when every segment runs as plain torch
and no call site names a body. A plan without segments is not interpreted.
says package (SEGMENT_RUN_PACKAGE or SEGMENT_RUN_CAPTURED). Unspecified
run modes are refused. Host segments marked as package are refused.
Plans written before this change must be emitted again to populate segment
run modes.
Go tests show tiny Llama requires 0 packages and tiny DeepSeek's required
package set is unchanged from main on CPU and GPU.
modes (package on CPU, captured on GPU).
badge ("plain torch", "package", "captured"), use the single
pass-through definition for its note ("Pass-through plan: Every call
site runs the engine's own implementation"), and hide the unmatched
plan sites section on pass-through plans.
Fixes #830