Skip to content

Validate GPU AI packing before allocation - #147

Merged
rsasaki0109 merged 1 commit into
mainfrom
codex/validated-gpu-ai-pack
Oct 12, 2026
Merged

rsasaki0109 merged 1 commit into
mainfrom
codex/validated-gpu-ai-pack

Conversation

@rsasaki0109

Copy link
Copy Markdown
Owner

GPU CHW image packing could acquire output storage before detecting unsupported output-binding/device limits or insufficient profile capacity. Validate source dimensions/channels, u32 pixel/element indices, checked output bytes, existing buffer/compute/binding limits and profiler ownership/capacity before allocation or pipeline setup.

The production shader, pipeline factory, CHW ordering, f32 normalization and tensor ownership/readback remain unchanged. No new scratch, payload transfer, pipeline, dependency or public signature is introduced. The two attempted optimizations stay native-test-only: channel lanes regressed across all selected GPU conditions; fixed-channel micro gains did not establish completed-call improvement and included adverse cases. No speedup is claimed.

Validation:

  • Six new tests verify 23,857,560 exact output words across 192 channel/shape/normalization cases against frozen GPU words, including independent exact CPU cases, both experimental shaders, extreme finite parameters, ROI/concurrency/live tensor reuse and invalid limits/ownership/capacity.
  • A 4096x4096 resident Vision chain verifies 16,777,216 zero tensor words, six passes, unchanged payload receipts and 96 separately collected query bytes. Oversize declared-source rejection uses a metadata-only negative probe rather than a giant image allocation.
  • 154 native image/point GPU tests pass; strict default/all-feature Clippy, two WASM compilation profiles, formatting and diff checks pass. Browser execution is not claimed.
  • All 24 final resident timing controls are published, with two warmups and twenty alternating rounds each. The frozen shader shares the current host executor, so this is not historical API-overhead measurement. Pilot results and adverse samples are retained in the note.

Implementation and measurement note.

Based on merged PR #146 (main a9ba90e). Merge is gated on the frozen source head, all 114 named checks succeeding, no pending/failed checks and a clean merge state.

@rsasaki0109
rsasaki0109 merged commit 5a38b1d into main Oct 12, 2026
115 checks passed
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