8000 xls/scheduling: Generalize ScheduleBounds and ASAPScheduler. by copybara-service[bot] · Pull Request #5600 · google/xls · GitHub
[go: up one dir, main page]

Skip to content

xls/scheduling: Generalize ScheduleBounds and ASAPScheduler. - #5600

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1030867079
Draft

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1030867079

Conversation

@copybara-service
Copy link
Copy Markdown

xls/scheduling: Generalize ScheduleBounds and ASAPScheduler.

ASAP bounds search previously stopped after a fixed 6 iterations and did not
support DifferenceConstraint, negative/unbounded IOConstraints, synchronous
multi-proc ScheduleGraphs, 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
    ScheduleGraphs: 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 IOConstraints, 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.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0