tests/semantic: sopc and unary f16 validation skip spirv-val without SPIRV-Tools (TEST-SPIRV-TOOLS-OPTIONAL) #940

Closed
github-bot wants to merge 1 commit from gh-pr/940/head into gh-pr/940/base
Owner

@⁠Luna-OS on GitHub · 2026-11-24 15:23 UTC · original
Luna-OS:fix/semantic-spirv-tools-optional → main · +9 −2 · 2 files · 1 commits · closed without merging

Claimed in the coordination issue as: TEST-SPIRV-TOOLS-OPTIONAL (#14)

What and why

AGENTS.md says python -I scripts/run_semantic_tests.py tests/semantic needs no LLVM, SPIR-V tools or GPU. On a machine without SPIRV-Tools it ends red anyway:

465 files, 6108 tests, 2 files failed in 1124 s with 12 jobs: test_sopc_validation, test_unary_f16_validation

Both files assert that spirv-as/spirv-val are on PATH (1 + 15 failures), while the other 60-odd files that use those tools skip the step. These two now use the same pattern as tests/semantic/test_reg_ptr_hoist.py:

  • without the tools only the spirv-as/spirv-val step is skipped; the translation and the interpreter checks in the same tests still run (a skipTest would have dropped those too);
  • with LEONIDA_REQUIRE_SPIRV_TOOLS=1 (the CI Linux leg, tests/semantic/test_spirv_tools_required.py) a missing tool is still a failure.

Tested

Windows 11, Python 3.13.7, no SPIRV-Tools, no game files:

  • test_sopc_validation.py: OK (was 1 failure); with LEONIDA_REQUIRE_SPIRV_TOOLS=1: still fails, as intended
  • test_unary_f16_validation.py: OK (was 15 failures); with LEONIDA_REQUIRE_SPIRV_TOOLS=1: still fails, as intended
  • tests/test_ci_registration.py: OK
  • Full suite before the change: 463/465 files green; the two failures were these files.

Not run with SPIRV-Tools installed here; the validation code path itself is unchanged.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • No translator rule changed.

🤖 Generated with Claude Code

**@⁠Luna-OS** on GitHub · 2026-11-24 15:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/940) `Luna-OS:fix/semantic-spirv-tools-optional` → `main` · +9 −2 · 2 files · 1 commits · closed without merging Claimed in the coordination issue as: TEST-SPIRV-TOOLS-OPTIONAL (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why AGENTS.md says `python -I scripts/run_semantic_tests.py tests/semantic` needs no LLVM, SPIR-V tools or GPU. On a machine without SPIRV-Tools it ends red anyway: ``` 465 files, 6108 tests, 2 files failed in 1124 s with 12 jobs: test_sopc_validation, test_unary_f16_validation ``` Both files assert that `spirv-as`/`spirv-val` are on PATH (1 + 15 failures), while the other 60-odd files that use those tools skip the step. These two now use the same pattern as `tests/semantic/test_reg_ptr_hoist.py`: - without the tools only the `spirv-as`/`spirv-val` step is skipped; the translation and the interpreter checks in the same tests still run (a `skipTest` would have dropped those too); - with `LEONIDA_REQUIRE_SPIRV_TOOLS=1` (the CI Linux leg, `tests/semantic/test_spirv_tools_required.py`) a missing tool is still a failure. ### Tested Windows 11, Python 3.13.7, no SPIRV-Tools, no game files: - `test_sopc_validation.py`: OK (was 1 failure); with `LEONIDA_REQUIRE_SPIRV_TOOLS=1`: still fails, as intended - `test_unary_f16_validation.py`: OK (was 15 failures); with `LEONIDA_REQUIRE_SPIRV_TOOLS=1`: still fails, as intended - `tests/test_ci_registration.py`: OK - Full suite before the change: 463/465 files green; the two failures were these files. Not run with SPIRV-Tools installed here; the validation code path itself is unchanged. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [x] No translator rule changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Both files failed outright when spirv-as/spirv-val were not on PATH, so the
semantic suite was red on a machine without SPIRV-Tools. Like
test_reg_ptr_hoist.py, only the validation step is skipped now; the interpreter
checks still run, and LEONIDA_REQUIRE_SPIRV_TOOLS=1 keeps a missing tool fatal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:29:29 +00:00
github-bot closed this pull request 2026-11-26 09:29:29 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 15:27 UTC · original · approved these changes

Reviewed exact head 773ce695c71b0f5f44c36ad2e2ce2a88eb5826f6. On this Bazzite host, which has neither spirv-as nor spirv-val, test_sopc_validation.py passed 11/11 and test_unary_f16_validation.py passed 5/5; the interpreter checks still execute while only external validation is skipped. With LEONIDA_REQUIRE_SPIRV_TOOLS=1, the corresponding runs fail explicitly with the expected missing-tools assertion (environment lacks the CI-required tools, so these are expected environment failures, not a PR regression). git diff --check passed. No game data or GPU used.

**@⁠KernelSmoker** on GitHub · 2026-11-24 15:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/940#pullrequestreview-6042188007) · **approved these changes** Reviewed exact head `773ce695c71b0f5f44c36ad2e2ce2a88eb5826f6`. On this Bazzite host, which has neither `spirv-as` nor `spirv-val`, `test_sopc_validation.py` passed 11/11 and `test_unary_f16_validation.py` passed 5/5; the interpreter checks still execute while only external validation is skipped. With `LEONIDA_REQUIRE_SPIRV_TOOLS=1`, the corresponding runs fail explicitly with the expected missing-tools assertion (environment lacks the CI-required tools, so these are expected environment failures, not a PR regression). `git diff --check` passed. No game data or GPU used.
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-24 16:02 UTC · original

Measured side by side with #676 and #136 in #676. Without SPIRV-Tools on Windows, #940 fixes both red files, but the validation step passes silently instead of skipping, and test_active_cache / test_reg_ptr_hoist stay red with LEONIDA_REQUIRE_SPIRV_TOOLS=0, the value ci.yml sets on Windows (main run 45369028646). #676 covers the same two files with visible skips.

**@⁠MoonEyes** on GitHub · 2026-11-24 16:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/940#issuecomment-7137030541) Measured side by side with #676 and #136 in https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/676. Without SPIRV-Tools on Windows, #940 fixes both red files, but the validation step passes silently instead of skipping, and `test_active_cache` / `test_reg_ptr_hoist` stay red with `LEONIDA_REQUIRE_SPIRV_TOOLS=0`, the value ci.yml sets on Windows (main run 45369028646). #676 covers the same two files with visible skips.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 17:00 UTC · original

Thanks for the fix. I'm closing this as a duplicate of #676, which covers the same two files and was claimed first:

  • TEST-SOPC-UNARY-SPIRV-TOOLS was claimed in #14 at 11:33 UTC, and #676 has been open since 11:37 UTC. TEST-SPIRV-TOOLS-OPTIONAL was claimed at 15:21 UTC.
  • AGENTS.md asks to check the open pull requests before claiming, and to stop if one already covers the item.
  • #676 also turns a missing spirv-val into a visible skipTest instead of an early return, and still fails when LEONIDA_REQUIRE_SPIRV_TOOLS=1. I checked that it keeps every assertion from main.

If I missed an earlier claim of yours, say so here and I'll reopen it.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 17:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/940#issuecomment-7138552954) Thanks for the fix. I'm closing this as a duplicate of #676, which covers the same two files and was claimed first: - `TEST-SOPC-UNARY-SPIRV-TOOLS` was claimed in #14 at 11:33 UTC, and #676 has been open since 11:37 UTC. `TEST-SPIRV-TOOLS-OPTIONAL` was claimed at 15:21 UTC. - `AGENTS.md` asks to check the open pull requests before claiming, and to stop if one already covers the item. - #676 also turns a missing `spirv-val` into a visible `skipTest` instead of an early `return`, and still fails when `LEONIDA_REQUIRE_SPIRV_TOOLS=1`. I checked that it keeps every assertion from `main`. If I missed an earlier claim of yours, say so here and I'll reopen it. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.