Repository navigation
Reuse compacted row indices in the xFit solver - #71
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
15dc343 to
9843894
Compare
aab6c3a to
7156d58
Compare
7156d58 to
27ca03d
Compare
melo-gonzo
left a comment
There was a problem hiding this comment.
LGTM. Reusing compacted indices preserves row order and solver results. All 120 base/head comparisons and 38 selected GPU tests passed.
Compute integer row indices once per selection and reuse them across aligned solver arrays. This avoids repeated Boolean-mask compaction and its host synchronization on CuPy. Cover mixed termination and failure paths with per-row parity checks. Signed-off-by: Trent Nelson <trentn@nvidia.com>
27ca03d to
4c4f802
Compare
Summary
Repeated Boolean indexing in the xFit Levenberg–Marquardt solver makes CuPy compact the same mask and synchronize its selected-row count for each array. Compute the row indices once per selection and reuse them across the parameters, residuals, derivatives and accepted steps. The arithmetic, row order and termination rules stay the same.
A matched single-worker GB200 experiment reduced median batch time from 375.051 to 331.110 seconds (1.133× throughput). Each of three measured rounds processed 32 distinct synthetic image pairs twice, with 256 fits per pair occurrence; timing included output writes and validation. The benchmarked solver matches this change byte-for-byte.
Validation
make test-cpu: 2,760 passed; 188 optional tests skipped.uv lock --check,uv run --locked --extra dev pre-commit run --all-files,make lintandmake build: passed.dataclasses.replace()exception-type assertion; reproduced against unchangedmain. Their numerical parity assertions pass.Repository hygiene