Skip to content

GPU tests: treat a missing shaderFloat64 as a SKIP, not a FAIL - #4718

Open
bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/f64-capability-skip
Open

bobcatchris wants to merge 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/f64-capability-skip

Conversation

@bobcatchris

Copy link
Copy Markdown
Contributor

Fixes the misclassification found during my Apple M2 check of #2537.

What and why

judge_cs_dump() in scripts/run_gpu_tests.py mapped harness exit 77 to a SKIP only when wave64=True. A 32-wide fixture that needs shaderFloat64 (e.g. #2537's cs_w32_trig_preop) exits 77 on a device without the feature, and was reported as a FAIL with the unsupported: ... no shaderFloat64 line as its detail. cs_f64_add already special-cased the same thing at its call site.

Now any exit 77 whose message names shaderFloat64 returns (None, "SKIP (no shaderFloat64 on this device)"), in every dump mode. Other exit-77 reasons are unchanged (still a failure for a non-wave64 fixture).

Tested

No game data; synthetic fixtures and counts only.

AI-assisted.

judge_cs_dump() mapped exit 77 to a skip only for wave64 fixtures, so a
32-wide module needing shaderFloat64 was judged as a failure on devices
without the feature even though the harness named the missing capability.

Return a SKIP whenever the harness exits 77 with a shaderFloat64 message,
in any dump mode; cs_f64_add already did the same at its own call site. Four
tests cover the 32-wide case, the other modes, other exit-77 reasons and a
normally running module.

Apple M2 / MoltenVK 1.4.2 end-to-end: ItsNotRexed#2537's cs_w32_trig_preop went from
FAIL to SKIP with this patch, with no code change to that PR.

AI-assisted.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 0f07fb360 on Windows 11: pytest tests/test_run_gpu_tests.py -q -> 45 passed, 53 subtests passed; git diff --check clean.

A device without shaderFloat64 now reports the affected GPU test as SKIP (with the capability named) instead of FAIL, matching the other capability-miss skips; the added cases pin the skip text and that a real failure is still a failure. No blocking issue.

@tupacfan04

Copy link
Copy Markdown
Contributor

Merge-ready. tests/test_run_gpu_tests.py 45/45, compileall and git diff --check clean, merge clean. Negative control: the same test file on untouched main gives 5 failures in Float64CapabilitySkip, exit 1.

Cosmetic only: the skip text at scripts/run_gpu_tests.py:349-350 is hard-coded and drops the harness's unsupported: ... context. Behaviour and all modes are correct.

Approve. AI-assisted review, no game files, no GPU.

@bobcatchris

Copy link
Copy Markdown
Contributor Author

Thanks for the merge-ready check and the negative control. I kept the fixed SKIP (no shaderFloat64 on this device) text deliberately: cs_f64_add (the existing f64 path, scripts/run_gpu_tests.py:946-949) emits that exact string, so the two f64 cases produce one stable reason across the suite. Quoting the harness with unsupported_skip(msg) would make the reason depend on the dylib path and driver wording, which is the context the other branches normalise away. Happy to change it if you'd rather have the raw line, but I'd leave behaviour as reviewed.

AI-assisted.

@Atomic258

Copy link
Copy Markdown

Re-ran at head 0f07fb36 on Windows 11, Python 3.15.2 (no GPU needed — pure judge-logic unit tests).

python -I tests\test_run_gpu_tests.py        → Ran 45 tests, OK, exit 0
python -m compileall -q scripts\run_gpu_tests.py tests\test_run_gpu_tests.py   → clean

Confirms the earlier 45/45 run at the same SHA.

Red control: git checkout origin/main -- scripts/run_gpu_tests.py (test file kept at PR version), re-ran → FAILED (failures=5), all in Float64CapabilitySkip, exit 1 — e.g. wave64 mode returned SKIP (no 64-wide compute subgroup...) for the f64 message and non-wave64 modes returned FAIL. Restored scripts/run_gpu_tests.py, re-ran → 45/45 OK. Worktree clean.

AI-assisted (Devin).

@memorypressure

memorypressure commented Nov 23, 2026 •

Copy link
Copy Markdown

Verified on Linux: tests/test_run_gpu_tests.py passes all 45 tests, including the 4 new ones — the capability skip fires only when exit 77 names shaderFloat64 (an unrelated 77 still fails, a running module is still judged by its words, and the skip holds in all four dump modes). The Apple Silicon behaviour it fixes could not be exercised here. Note your commit rides the round-43 stacked base; a rebase onto main would shrink the diff dramatically. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Correction (2026-11-23): the rebase/integration-stack note above was wrong — our verifier tracked a stale main ref. Those base commits are current main; this head contains main and merge-trees cleanly against de67135. No rebase needed; the tests-pass verdict stands unchanged. See the correction note on #4421.

@JRamos1993

Copy link
Copy Markdown
Contributor

Tested 0f07fb3 merged onto main de67135 on an RTX 5090 (driver 616.92), Windows 11, Vulkan SDK 1.4.363. The GPU test programs were built from the same tree:

  • scripts/run_gpu_tests.py: 170/217 passed, 47 skipped, 0 failed. main de67135 gives 170/217, 47 skipped, 0 failed. All 221 test shaders translate and pass spirv-val.
  • tests/test_run_gpu_tests.py: ran 45 tests in 0.523s; OK.

AI-assisted (Claude Code).

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.

6 participants