Skip to content

[scheduling] Generalize fast-return logic - #4704

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_958351780
Aug 3, 2026
Merged

[scheduling] Generalize fast-return logic#4704
copybara-service[bot] merged 1 commit into
mainfrom
test_958351780

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 3, 2026

Copy link
Copy Markdown

[scheduling] Generalize fast-return logic

When scheduling into one stage without a target clock period, even if we've been asked to attempt to explain failure to schedule, try the trivial schedule first. We only need to fall back to the full scheduler if we need to attempt to explain the problem.

Also, if we are doing a binary search on [start, end], we know start or end meets our criteria, and start == end, we can stop early without rechecking the criteria.

This also uncovered a possible crash in PipelineSchedule::ToProto (previously impossible to reach in standard operation); this has now been converted to forward the absl::Status rather than crashing.

@copybara-service
copybara-service Bot force-pushed the test_958351780 branch 2 times, most recently from 6151502 to 6c41b85 Compare August 3, 2026 16:41
When scheduling into one stage without a target clock period, even if we've been asked to attempt to explain failure to schedule, try the trivial schedule first. We only need to fall back to the full scheduler if we need to attempt to explain the problem.

Also, if we are doing a binary search on `[start, end]`, we know `start` or `end` meets our criteria, and `start == end`, we can stop early without rechecking the criteria.

This also uncovered a possible crash in `PipelineSchedule::ToProto` (previously impossible to reach in standard operation); this has now been converted to forward the `absl::Status` rather than crashing.

PiperOrigin-RevId: 958515070
@copybara-service
copybara-service Bot merged commit d21bf97 into main Aug 3, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_958351780 branch August 3, 2026 19:26
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