Skip to content

[fork CI only] Loop-free search of the next step/jump time in ClipStepSizeController - #1

Closed
etiferrier wants to merge 1 commit into
mainfrom
loop-free-jump-search
Closed

etiferrier wants to merge 1 commit into
mainfrom
loop-free-jump-search

Conversation

@etiferrier

Copy link
Copy Markdown
Owner

CI run inside my fork, not an upstream PR.

🤖 Generated with Claude Code

`_find_idx_with_hint` walked from the hint with two `lax.while_loop`s. It runs on
every step of an adaptive solve, and on GPU each `while_loop` iteration costs a
device-to-host synchronisation, so the search added a fixed cost to every step.
Use an unrolled binary search (`jnp.searchsorted(..., method="scan_unrolled")`)
instead: O(log len(ts)) fused comparisons, no loop. Same result, same dtype.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@etiferrier etiferrier closed this Oct 2, 2026
@etiferrier etiferrier reopened this Oct 2, 2026
@etiferrier

Copy link
Copy Markdown
Owner Author

Fork CI only; the change is now upstream as patrick-kidger#777.

@etiferrier etiferrier closed this Oct 2, 2026
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