Repository navigation
feat(gpu): vgpu exact-pixel and numerical conformance runner (#813) - #1357
Merged
Merged
Conversation
Replace the emit-only stub with a suite that reads the vgpu manifest, compiles each fill, compares rgba8unorm or f32 buffers against captured references, and prints EXACT/TOLERANCE/NUMERICAL/UNSUPPORTED/FAIL with inputs and max error. Gradient is byte-for-byte against a frozen upstream-formula capture; MNIST and depth stay UNSUPPORTED until tensor execution exists. Co-authored-by: Abhishek Shivakumar <[email protected]>
sl_push2 requires two strings; the gpu_vgpu script test failed to typecheck. Co-authored-by: Abhishek Shivakumar <[email protected]>
Only docs/project/CHANGELOG.md conflicted; kept main's new entries and the #813 vgpu runner entry.
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
Only docs/project/CHANGELOG.md conflicted (after #1357); kept both.
godofecht
added a commit
that referenced
this pull request
Oct 6, 2026
Only docs/project/CHANGELOG.md conflicted (after #1357); kept both.
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.
Closes #813
Intent
Linked issue or roadmap item: #813 (
[gpu] Build vgpu exact-pixel and numerical conformance runner).What changed, and why is this the smallest useful change?
PR #1297 landed an emit-only stub that printed
EXACT/NUMERICALwithout comparing pixels. This replaces that stub with a real suite: readexamples/gpu/vgpu/manifest.json, compile each fill, compare packed RGBA8 or f32 buffers against captured references, and print backend, dimensions, time/seed/camera/model, max error and verdict. Independent of #811/#812/#814 (no GPU IR, textures, or tensor execution).Overlap check
Overlap / dependency notes:
Part of #813and only compiled shaders.tools/gpu_testor the vgpu corpus.UNSUPPORTED(tensor-model-execution) until [gpu] Connect Flow tensors and model execution to shared GPU resources #814 exists.Evidence
Baseline before this change:
./flow gpu test --suite vgpu --all-backendscompiled fills with--emit-onlyand printedEXACT/NUMERICALwith no reference comparison, no max error, and no capture.Targeted proof that exercises the changed behaviour:
./flow gpu test --selftest→SELFTEST PASStests/gpu/vgpu/:EXACTpass,EXACTmismatch exits 1 (maxError=1),TOLERANCE,NUMERICALpass/fail,UNSUPPORTED./flow gpu test --suite vgpu --all-backends→ gradientEXACTat 160×90 againstexamples/gpu/vgpu/refs/gradient_160x90.rgba8.hexon metal and webgpu; mnist/depthUNSUPPORTED./flow test-scripts gpu_vgpu wiki_nav doc_anchors→ 10 + 17 + 14 passedWhy that proof would detect the old failure or regression:
The old runner printed
EXACTfor any compiling fill andNUMERICALwhenfillwas missing.exact_failhas no fill and mismatched RGBA; the stub would have exited 0, the new runner exits 1 withFAIL maxError=1. Tampering with the frozen gradient hex also fails byte-for-byte compare.Repository gate(s) run:
./flow gpu test --selftest./flow gpu test --suite vgpu --all-backends./flow test-scripts gpu_vgpu wiki_nav doc_anchors./flow tool wiki_nav --problems(empty)Generated/bootstrap state, if any:
None.
compiler/srcwas not edited; bootstrap C was not regenerated. The gradient hex is a captured reference from--capture-reference, not generated C.Risk
Compatibility, performance, security, lifetime, backend, or release implications:
CLI
flow gpu testremains the entry point. Verdict lines gained structured fields; scripts that grepped onlyEXACTstill match. Capture never runs unless--capture-referenceis passed. No Metal/WebGPU device is required in CI: comparison uses the FlowcompareRgbacontract against frozen bytes; shader emit still runs throughflow shader --emit-only.docs/project/Questions.mdupdated if this needs a language-design decision.Compatibility
docs/project/CHANGELOG.md.The new flags (
--manifest,--case,--capture-reference,--selftest) are additive. CHANGELOG records the runner under Unreleased.Agent handoff
Agent/provider/session, when applicable: Cursor cloud agent.
Any remaining blocker is recorded in GitHub rather than only in local/session state: none for #813. Tensor/model cases stay
UNSUPPORTEDon purpose (#814).