Repository navigation
tests: the pytest helper takes a text-only sample's lines as its listing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY) - #1375
Conversation
…ing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY) translator-tests fails on main since 6261ca9 (the merge of ProjectLeonida#957), which added runtime/test/shaders/cs_dpp_cmp.asm: tests/test_translate.py::test_gpu_samples_translate_and_validate[cs_dpp_cmp.asm] and ::test_wave64_emulate_uses_no_subgroup_ops[cs_dpp_cmp.asm] stop at the llvm-mc assertion of conftest.Shader with "dpp variant of this instruction is not supported" (2 failed, 1879 passed on a runner with llvm-mc 21; the same two with 23.1.4). llvm-mc has no gfx1013 encoding for a VOPC compare in DPP form, so the fixture carries the line "; run_gpu_tests: text only, ..." and assemble_to_s in scripts/run_gpu_tests.py writes its listing from the text. conftest.Shader assembled every sample with llvm-mc and did not know the line. It now does the same as the GPU runner for a sample that carries it, so both tests translate and validate the fixture instead of failing before they reach the translator. Two new tests: the line is spelled in conftest as in run_gpu_tests.py, and only a sample that carries it skips llvm-mc (the same lines without it still go to llvm-mc and fail there). Controls: with the line spelled differently in conftest the spelling test and both cs_dpp_cmp tests fail; with every sample taking the text path the second new test fails. The translator-tests step with the workflow's file list (37 files, pytest 9.2.0, llvm-mc 23.1.4, without numpy and Pillow, so 134 skipped): 2 failed, 1618 passed on main 89d7dfc; 1622 passed here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Author of #957 here. This break is mine: I ran the semantic tests, the decoder and disassembler tests and the GPU runner for that PR, but not Run with the two versions you list as not run locally, Python 3.12.10 and llvm-mc 21.1.8 (native Windows build), pytest 9.2.0, SPIRV-Tools v2026.4, Windows 11:
Taking the listing from the marked sample's text is the same rule the GPU runner applies, so the fixture means the same thing in both places. Reading the mark's spelling out of Not run here: the other 36 files of the Translator tests step, the controls with the altered spelling, and anything on a GitHub runner. AI-assisted: yes (Claude Code) |
|
CI for this commit on my fork, since the queue here is hours behind (manual runs of the This branch,
This branch merged with #1365's (a scratch branch, deleted after the run): https://github.com/milk4sale/leonida/actions/runs/45504603770
AI-assisted. |
|
Tested on Windows 11, Python 3.12.10, LLVM 23.1.6
So this PR fixes them on Windows as well. They only show up when (AI-assisted test run; output checked by hand.) |
|
Verified independently on Before (unmodified main, the workflow's own pytest file list: 37 files): Both stop in After: The spelling test is a good guard: it would have caught the two copies of the marker diverging, which is the only way the unmarked path could come back silently. This also matters beyond the Linux AI-assisted (verification run only). |
|
Merging.
Thanks @milk4sale, and @quartz-heron-58, @DeadlyChirp and @wavehs for the runs. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2) |
Claimed in the coordination issue as: TEST-TRANSLATE-TEXT-ONLY (#14 (comment))
What and why
translator-testsis red onmainsince6261ca916, the merge of #957 at 21:04 UTC on 24 November, so it fails on every pull request whose run starts on amainfrom then on. Two tests fail, both on the fixture #957 added:tests/test_translate.py::test_gpu_samples_translate_and_validate[cs_dpp_cmp.asm]tests/test_translate.py::test_wave64_emulate_uses_no_subgroup_ops[cs_dpp_cmp.asm]Both stop at the llvm-mc assertion of
conftest.Shaderwitherror: dpp variant of this instruction is not supported, before they reach the translator.llvm-mc has no gfx1013 encoding for a VOPC compare in DPP form. #957 dealt with that for the GPU suite:
cs_dpp_cmp.asmcarries the comment line; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here, andassemble_to_sinscripts/run_gpu_tests.pythen writes the listing from the file's text. The pytest helper assembles every sample with llvm-mc and did not know that line.conftest.Shadernow does what the GPU runner does for a sample that carries the line: its instruction lines are the listing, in the same form. Both tests then translate and validate the fixture. A sample without the line is assembled as before, and fails as before when llvm-mc rejects it. The fixture, the translator and the GPU runner are unchanged.This is independent of #1365, which fixes the other test that is red on
main(tests/test_ci_registration.py, in the standard-library loop). The two touch different files.Tested
test_text_only_mark_is_spelled_as_in_the_gpu_runnerreads the line out ofscripts/run_gpu_tests.py, so the two copies cannot drift apart unnoticed;test_only_a_marked_sample_skips_llvm_mcgivesShaderlines llvm-mc rejects, once with the line (the listing is the text, comment lines dropped) and once without (the llvm-mc assertion still fires).conftest.py, the spelling test and bothcs_dpp_cmptests fail; with every sample taking the text path, the second new test fails.main89d7dfcf5, 2 failed, 1618 passed; on this branch, 1622 passed. Run with pytest 9.2.0 on Python 3.14.10, llvm-mc 23.1.4 and SPIRV-Tools v2026.4, in an environment without numpy and Pillow, so 134 tests that need them were skipped in both runs.main4a50cafc7and of tests: the CI registration scan counts the tests a TestCase inherits from a class of its module (TEST-CI-REG-LOCAL-MIXIN) #1365's branch (main89d7dfcf5plus its one commit, which touches neither file): 2 failed, 1879 passed, 14 skipped.tests/withpython -I(491 files): 490 pass. The one failure istests/test_ci_registration.py, red onmainsince rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) (SHADER-SUB-CO-SAME) #930 and fixed by tests: the CI registration scan counts the tests a TestCase inherits from a class of its module (TEST-CI-REG-LOCAL-MIXIN) #1365, not by this.python -I scripts/check_no_game_data.py tests/conftest.py tests/test_translate.py,python -m compileallandgit diff --check.Not run locally: Python 3.12 and llvm-mc 21 (the versions the job installs), and the tests that need numpy or Pillow.
GPUs tested: n/a (two Python test files; no shader, fixture or runtime code)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code