Skip to content

test(metal): establish host-slice transfer baseline - #105

Closed
jcwal1516 wants to merge 1 commit into
perf/audit-00-metal-idwt97-baselinesfrom
perf/audit-00-metal-host-copy-baselines
Closed

jcwal1516 wants to merge 1 commit into
perf/audit-00-metal-idwt97-baselinesfrom
perf/audit-00-metal-host-copy-baselines

Conversation

@jcwal1516

Copy link
Copy Markdown
Member

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 d868e4b9 completed 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.

@jcwal1516 jcwal1516 closed this Sep 9, 2026
@jcwal1516
jcwal1516 deleted the perf/audit-00-metal-host-copy-baselines branch September 10, 2026 01:27
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