Skip to content

Reland xls scheduler refactor. Fix issues causing regressions on some targets. - #4324

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_920305238
May 28, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_920305238

Conversation

@copybara-service

Copy link
Copy Markdown

Reland xls scheduler refactor. Fix issues causing regressions on some targets.

A mismatch between how the proto considers the worst-case-throughput flag to be unset and the way the SchedulingOptions struct does led to the initial version of this incorrectly believing the WCT was unspecified in some scenarios when it was fully set.

Original Description: Refactor XLS schedulers to use a common interface and allow for selecting scheduler for minimization workloads.

This change introduces a Scheduler abstract base class, and refactors ASAP, MinCut, and SDC scheduling algorithms to implement this interface. A new RandomScheduler is also added. The run_pipeline_schedule utility is updated to use this new interface. Additionally, a new option and flag --find_bounds_strategy are added, allowing a different scheduler (defaulting to the selected scheduling algorithm usually SDC) to be used for finding minimum clock period and worst-case throughput bounds, which can be faster than using the main scheduling strategy. Error handling in run_pipeline_schedule is also improved.

The 'random' scheduler is also updated to make use of the ASAP scheduler bounds to do a much better job at consistently choosing allowable schedules.

The previous run_pipeline_scheduleing had a number of subtle bugs around how its configuration was interpreted that have all been fixed up, requiring some changes to tests which relied on the previous behavior.

Testing is improved to check schedulers other than SDC. Many tests needed to be tweaked to account for the different ways these schedulers work.

… targets.

A mismatch between how the proto considers the worst-case-throughput flag to be unset and the way the SchedulingOptions struct does led to the initial version of this incorrectly believing the WCT was unspecified in some scenarios when it was fully set.

Original Description: Refactor XLS schedulers to use a common interface and allow for selecting scheduler for minimization workloads.

This change introduces a `Scheduler` abstract base class, and refactors `ASAP`, `MinCut`, and `SDC` scheduling algorithms to implement this interface. A new `RandomScheduler` is also added. The `run_pipeline_schedule` utility is updated to use this new interface. Additionally, a new option and flag `--find_bounds_strategy` are added, allowing a different scheduler (defaulting to the selected scheduling algorithm usually SDC) to be used for finding minimum clock period and worst-case throughput bounds, which can be faster than using the main scheduling strategy. Error handling in `run_pipeline_schedule` is also improved.

The 'random' scheduler is also updated to make use of the ASAP scheduler bounds to do a much better job at consistently choosing allowable schedules.

The previous run_pipeline_scheduleing had a number of subtle bugs around how its configuration was interpreted that have all been fixed up, requiring some changes to tests which relied on the previous behavior.

Testing is improved to check schedulers other than SDC. Many tests needed to be tweaked to account for the different ways these schedulers work.

PiperOrigin-RevId: 922893892
@copybara-service
copybara-service Bot merged commit 5e7f3fe into main May 28, 2026
@copybara-service
copybara-service Bot deleted the test_920305238 branch May 28, 2026 18:52

This branch was previously deployed

1 inactive deployment
github-pages — 5e7f3fe5 Deployed May 28, 2026 by copybara-service[bot] via deploy #10164
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