Repository navigation
xls/scheduling: Generalize ScheduleBounds and ASAPScheduler. - #5600
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
ASAP bounds search previously stopped after a fixed 6 iterations and did not
support `DifferenceConstraint`, negative/unbounded `IOConstraint`s, synchronous
multi-proc `ScheduleGraph`s, unconditional state read-before-write, or per-arc
throughput limits enforced by `SDCSchedulingModel`. Bringing `ScheduleBounds`
and `ASAPScheduler` to full parity enables using ASAP as the default
bounds-search scheduler in a follow-up change.
* Replace the fixed 6-iteration propagation limit with an exact Bellman-Ford
bound over constrained nodes (plus a virtual last stage when present), with
parent-justification tracking to detect infeasible positive constraint cycles
early and avoid worst-case iteration counts on large graphs.
* Match `SDCSchedulingModel` constraint semantics across single- and multi-proc
`ScheduleGraph`s: share `SendThenRecvConstraint`, `SameChannelConstraint`,
state predicate, and arc worst-case throughput resolution helpers via
`schedule_util`; enforce unconditional state read-before-write (including for
dead-after-synthesis state elements); and handle `DifferenceConstraint`,
negative/unbounded `IOConstraint`s, overflow-safe clamped bounds, and empty
schedules.
* Thread per-arc and default worst-case throughput overrides through
`ASAPScheduler`, `MinCutScheduler`, and `RandomScheduler`, map infeasible
ASAP bounds to `ResourceExhaustedError` even without `pipeline_stages`, and
remove `ScheduleGraph::RefineTopoSort` (superseded by iterative propagation).
Review guide: core algorithmic risk is in `schedule_bounds.cc` (constraint
conversion, Bellman-Ford convergence, and parent-justification cycle detection);
`schedule_util.{h,cc}` / `sdc_scheduler.cc` is mechanical helper extraction, and
the remaining files are constructor plumbing and tests.
PiperOrigin-RevId: 1030867079
copybara-service
Bot
force-pushed
the
test_1030867079
branch
from
December 1, 2026 23:40
ee8815a to
12b0aac
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xls/scheduling: Generalize ScheduleBounds and ASAPScheduler.
ASAP bounds search previously stopped after a fixed 6 iterations and did not
support
DifferenceConstraint, negative/unboundedIOConstraints, synchronousmulti-proc
ScheduleGraphs, unconditional state read-before-write, or per-arcthroughput limits enforced by
SDCSchedulingModel. BringingScheduleBoundsand
ASAPSchedulerto full parity enables using ASAP as the defaultbounds-search scheduler in a follow-up change.
bound over constrained nodes (plus a virtual last stage when present), with
parent-justification tracking to detect infeasible positive constraint cycles
early and avoid worst-case iteration counts on large graphs.
SDCSchedulingModelconstraint semantics across single- and multi-procScheduleGraphs: shareSendThenRecvConstraint,SameChannelConstraint,state predicate, and arc worst-case throughput resolution helpers via
schedule_util; enforce unconditional state read-before-write (including fordead-after-synthesis state elements); and handle
DifferenceConstraint,negative/unbounded
IOConstraints, overflow-safe clamped bounds, and emptyschedules.
ASAPScheduler,MinCutScheduler, andRandomScheduler, map infeasibleASAP bounds to
ResourceExhaustedErroreven withoutpipeline_stages, andremove
ScheduleGraph::RefineTopoSort(superseded by iterative propagation).Review guide: core algorithmic risk is in
schedule_bounds.cc(constraintconversion, Bellman-Ford convergence, and parent-justification cycle detection);
schedule_util.{h,cc}/sdc_scheduler.ccis mechanical helper extraction, andthe remaining files are constructor plumbing and tests.