Skip to content

feat(gpu): vgpu exact-pixel and numerical conformance runner (#813) - #1357

Merged
godofecht merged 5 commits into
mainfrom
cursor/vgpu-conformance-runner-e0ae
Oct 6, 2026
Merged

godofecht merged 5 commits into
mainfrom
cursor/vgpu-conformance-runner-e0ae

Conversation

@godofecht

@godofecht godofecht commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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/NUMERICAL without comparing pixels. This replaces that stub with a real suite: read examples/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

  • I searched open pull requests and recent commits for overlapping work.
  • This does not duplicate another active implementation, or the relationship is explained below.

Overlap / dependency notes:

Evidence

Baseline before this change:

./flow gpu test --suite vgpu --all-backends compiled fills with --emit-only and printed EXACT/NUMERICAL with no reference comparison, no max error, and no capture.

Targeted proof that exercises the changed behaviour:

  • ./flow gpu test --selftest → SELFTEST PASS
  • Fixture manifests under tests/gpu/vgpu/: EXACT pass, EXACT mismatch exits 1 (maxError=1), TOLERANCE, NUMERICAL pass/fail, UNSUPPORTED
  • ./flow gpu test --suite vgpu --all-backends → gradient EXACT at 160×90 against examples/gpu/vgpu/refs/gradient_160x90.rgba8.hex on metal and webgpu; mnist/depth UNSUPPORTED
  • ./flow test-scripts gpu_vgpu wiki_nav doc_anchors → 10 + 17 + 14 passed

Why that proof would detect the old failure or regression:

The old runner printed EXACT for any compiling fill and NUMERICAL when fill was missing. exact_fail has no fill and mismatched RGBA; the stub would have exited 0, the new runner exits 1 with FAIL 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
  • fixture manifests (exact/tolerance/numerical/unsupported)
  • ./flow test-scripts gpu_vgpu wiki_nav doc_anchors
  • ./flow tool wiki_nav --problems (empty)

Generated/bootstrap state, if any:

None. compiler/src was 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 test remains the entry point. Verdict lines gained structured fields; scripts that grepped only EXACT still match. Capture never runs unless --capture-reference is passed. No Metal/WebGPU device is required in CI: comparison uses the Flow compareRgba contract against frozen bytes; shader emit still runs through flow shader --emit-only.

  • No unresolved language/API design decision is being implemented implicitly.
  • No unrelated generated artifacts or local state are included.
  • Docs changed when user-visible behaviour or syntax changed.
  • docs/project/Questions.md updated if this needs a language-design decision.

Compatibility

  • No user-visible compatibility change.
  • Compatibility change is documented in 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 UNSUPPORTED on purpose (#814).

Open in Web Open in Cursor 

cursoragent and others added 5 commits October 5, 2026 11:49
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
godofecht merged commit ba8ac15 into main Oct 6, 2026
42 checks passed
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.
@godofecht
godofecht deleted the cursor/vgpu-conformance-runner-e0ae branch October 12, 2026 23:02
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.

[gpu] Build vgpu exact-pixel and numerical conformance runner

2 participants