Skip to content

[fork CI only] loop-free search, tests past main's pyright error - #2

Closed
etiferrier wants to merge 2 commits into
mainfrom
loop-free-jump-search-ci
Closed

etiferrier wants to merge 2 commits into
mainfrom
loop-free-jump-search-ci

Conversation

@etiferrier

Copy link
Copy Markdown
Owner

Fork-only CI run: the PR commit plus continue-on-error on pre-commit, so that the tests and docs build run despite pyright's _misc.py:175 error (also on main). Not for upstream.

🤖 Generated with Claude Code

etiferrier and others added 2 commits October 1, 2026 19:26
`_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

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
@etiferrier
etiferrier deleted the loop-free-jump-search-ci branch October 2, 2026 10:34
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