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.
The synchronous 5/3 and 9/7 host-slice IDWT callbacks now allocate only the required device output size, without uploading the caller's overwritten output. After the existing command wait, a checked private helper copies completed buffer bytes directly into the required host prefix, avoiding a temporary readback vector and preserving oversized destination tails.
Depends on baseline draft #105 (
perf/audit-00-metal-host-copy-baselines, d868e4b). Candidate 33826b7 is independent of the compact-grid/fused-kernel and JPEG scratch optimizations. Element/byte size overflow, bounds, typed alignment, CPU visibility, empty ranges and zero-sized ABI checks are preserved through existing audited access boundaries. No new raw pointer access, public API, shader, route, dependency, or asynchronous semantics change. Owned-result callers retain their vector helpers.Validation: the transfer regression first failed on the baseline (268 uploaded bytes, one 268-byte vector versus required zero), then passed. Four focused callback tests and two copy-helper tests passed, covering both wavelets/normalizations, odd and degenerate origins, destination capacities/sentinel tails, rejected huge/empty geometry, offsets, alignment, bounds, private storage and empty/ZST cases.
cargo run --locked -p xtask -- release-metal --mode quickpassed at 33826b7, including production/non-library Clippy, seven runtime/integration groups, inventory and all 21 required ignored hardware tests. Formatting and diff checks passed. Optional external Aperio input remains unavailable.Identical committed harness, Apple M4 Pro, pinned Rust 1.96, release-bench, serial measurements: 50 calibrated samples after 3-second warmup for the copy/full-host diagnostics; four Criterion resident/readback controls with 50 samples, 3-second warmup and 10-second requested measurement.
All routes pass the predeclared 2% regression gate. The four resident/readback controls range from 0.32% faster to 0.13% slower, with mean-change upper intervals at most +0.86%. This is an allocation/copy reduction, not a general full-decode speedup: the isolated CPU-visible copy is approximately 2.01× faster but excludes GPU execution/wait. Full host decode removes three temporary readback vectors and 1,024,780 or 1,376,256 bytes each of overwritten-output upload and vector readback per decode. Coefficient uploads, the final required host copy, and waits remain.
Raw samples, intervals and comparison CSVs are retained outside the checkout. Remaining merge gate: successful manual exact-head GitHub Metal validation workflow. CUDA validation is deferred until the end at the user's request; no CUDA result is claimed. External routing/adoption corpora were not run.