Repository navigation
perf(vision): reuse LK pyramids across forward/backward passes - #335
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Robust LK rebuilt both CPU image pyramids for each direction. Reuse one private owned pair for u8/u16/f32/f64, preserving the point calculations, validation, public APIs and observable custom-component conversions. Four pyramid constructions become two; peak pyramid payload stays two.
Validation: 90 vision tests before and after, 24 web tests, no-feature vision build, two Clippy checks and workspace formatting pass. Independent frozen native camera reports match all 126 outputs; actual parent/candidate WASM matches 252 reports and 84 rejections. All 92 JS, six asset and 86 browser controls pass with synthetic capture.
Two prospective interleaved CPU surveys retain all 18 paired medians: 15 lower and three higher for the candidate. All samples, including the 5.3% adverse condition, are recorded. These observations do not prove physical-phone or end-to-end speed. Preserve the prelaunch wrapper failure and corrected owner.
The dedicated offline build stays under its 1 GiB cap with zero shared-cache growth; all 2,437 earlier camera/renderer files, scientific evidence and frozen native artifacts are preserved. No sensor, model, SDK, browser or toolchain acquisition. See docs/LK_PYRAMID_REUSE.md and docs/receipts/2026-10-22_lk_pyramid_reuse.json. Operational 80% gates remain open.