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
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1375
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1375"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@milk4sale on GitHub · 2026-11-24 22:49 UTC · original
milk4sale:test/translate-text-only-sample→main· +33 −4 · 2 files · 1 commits · merged 2026-11-26 18:53 UTCClaimed in the coordination issue as: TEST-TRANSLATE-TEXT-ONLY (#14)
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 #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 #930 and fixed by #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
@quartz-heron-58 on GitHub · 2026-11-24 22:53 UTC · original
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
tests/test_translate.pyunder pytest, which picks up every file inruntime/test/shadersand assembles it with llvm-mc. Thank you for finding and fixing it.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:
e8fee01c,pytest tests/test_translate.py: 2 failed, 675 passed. The two aretest_gpu_samples_translate_and_validate[cs_dpp_cmp.asm]andtest_wave64_emulate_uses_no_subgroup_ops[cs_dpp_cmp.asm], both at the llvm-mc assertion intests/conftest.py.8d29ffd2, same command: 679 passed, 0 failed. That is the two repaired tests plus your two new ones.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
scripts/run_gpu_tests.pycovers the drift I would otherwise have worried about.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)
@milk4sale on GitHub · 2026-11-24 23:11 UTC · original
CI for this commit on my fork, since the queue here is hours behind (manual runs of the
CIworkflow, so each branch as it is; Python 3.12, llvm-mc 21, numpy and Pillow installed).This branch,
8d29ffd26onmain0f98d193c: https://github.com/milk4sale/leonida/actions/runs/45504536550translator-tests: success, 1883 passed and 14 skipped. Onmainthe same job gives 2 failed and 1879 passed. That covers what I had not run locally.semantic-tests (ubuntu-latest)andviewer-tests: success.stdlib-tests-linuxandmacos-python: failure, and the one failing file in each istests/test_ci_registration.py, red onmainsince #930. #1365 fixes it.This branch merged with #1365's (a scratch branch, deleted after the run): https://github.com/milk4sale/leonida/actions/runs/45504603770
translator-tests,stdlib-tests-linux,semantic-tests (ubuntu-latest)andviewer-tests: all success. So with the two pull requests every Linux job of the workflow is green.macos-pythonran every standalone file and the semantic suite (6191 tests) with no failure, and was cancelled at its 20-minute limit before the pytest step.checkwas cancelled at its 15-minute limit, as in every run on the fork today. It had started 379 of 491 files; the two that failed aretests/test_bink_names.pyandtests/test_opus_tags.py, which #128 is about.AI-assisted.
@DeadlyChirp on GitHub · 2026-11-25 15:15 UTC · original
Tested on Windows 11, Python 3.12.10, LLVM 23.1.6
llvm-mc(conda-forge), SPIRV-Tools from the Vulkan SDK. I merged8d29ffd26onto upstream main (merge commit edb928dff).python -m pytest -q tests/test_translate.pywith this PR: 710 passed.Same command on main: 2 failed, 706 passed. Both failures come from the text-only sample
runtime/test/shaders/cs_dpp_cmp.asm(added ind04655943):test_gpu_samples_translate_and_validate[cs_dpp_cmp.asm]test_wave64_emulate_uses_no_subgroup_ops[cs_dpp_cmp.asm]The error is
<stdin>:15:1: error: dpp variant of this instruction is not supported(v_cmp_gt_f32_dpp vcc_lo, v1, v1 dpp8:[...],-mcpu=gfx1013).So this PR fixes them on Windows as well. They only show up when
llvm-mcis available, which may be why CI hasn't flagged them.(AI-assisted test run; output checked by hand.)
@wavehs on GitHub · 2026-11-26 18:11 UTC · original
Verified independently on
mainbd6ba97ab(macOS 27.2.1 arm64, Homebrew llvm-mc 23.1.5, SPIRV-Tools, Python 3.15.2 in a venv with the pinned requirements). The PR diff applies cleanly and is the only change applied.Before (unmodified main, the workflow's own pytest file list: 37 files):
Both stop in
tests/conftest.py:183atllvm-mcwitherror: dpp variant of this instruction is not supported, before the translator runs — exactly the diagnosis in the description.After:
1923 passed, 20 skipped, 129 subtests passed(the two fixed tests plus the two new ones).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
translator-testsjob: themacos-pythonjob installs Homebrewllvm(23.x now), socs_dpp_cmpfails there too; with this change the local run is green on 23.1.5.AI-assisted (verification run only).
@aslan2142 on GitHub · 2026-11-26 18:53 UTC · original
Merging.
test_translate.pynow takes a text-only sample as text, asrun_gpu_tests.pydoes, socs_dpp_cmpno longer fails at llvm-mc. Only a sample that carries the exact text-only line skips llvm-mc, and a new test checks that an unmarked sample llvm-mc rejects still fails.maine57bc63bc+ this PR (8d29ffd26):pytest tests/test_translate.py: 2 failed and 714 passed onmain, 718 passed here. The twocs_dpp_cmpcases went from fail to pass, and nothing went from pass to fail.test_ci_registration.py,compileallandcheck_no_game_data.pypass.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)