Conversation
This was referenced Sep 8, 2026
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.
This establishes the comparison boundary for removing redundant host-slice IDWT transfers. Both 5/3 and 9/7 callbacks now call one private copy-into helper that still performs the original temporary-vector readback followed by a host copy. The output upload remains unchanged.
Test-only counters record overwritten-output upload bytes and actual successful nonempty readback-vector allocations/bytes. The existing full host-slice timing diagnostic reports those counts alongside its unchanged elapsed-time samples. A new optional diagnostic measures the CPU-visible buffer-copy helper alone, with the source and destination prepared outside timing and output made observable after every copy. It does not measure a GPU wait.
New tests cover exact/oversized/undersized output slices, sentinel tails, odd and degenerate origins, both wavelets and normalization modes, empty jobs, huge rejected geometry, selected buffer offsets, alignment, bounds, CPU-invisible private buffers, empty ranges, and zero-sized ABI rejection. The baseline transfer test confirms one full-output upload and one temporary readback allocation.
Depends on draft #99 (
perf/audit-00-metal-idwt97-baselines); independent of the optimization branches. No public API, shader, routing, dependency, unsafe-pointer, or support-boundary change. The 21 required ignored hardware tests remain unchanged; the new diagnostic is optional.Validation: four callback-contract tests and two copy-helper tests passed on this Metal host (the empty-job case is pure). Production and non-library Clippy, ten focused xtask tests, all 27 compiled ignored names, formatting, and diff checks passed. Committed baseline at
d868e4b9completed two isolated copy groups and four full host-slice groups (50 calibrated batches after 3-second warmup) plus four resident/readback controls (50 Criterion samples, 3-second warmup, 10-second requested measurement), all in release-bench on Apple M4 Pro. No speed claim is made by this prerequisite.CUDA checks remain deferred until the end at the user's request. Local results do not replace the manual exact-head GitHub Metal workflow required before merge. Optional external Aperio/routing corpora remain unavailable.