run_gpu_tests: find a versioned llvm-mc when --llvm-mc and LLVM_MC are unset (TEST-RUN-GPU-TESTS-VERSIONED-LLVM-MC) #1978
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1978"
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?
Imported from ubiquitarianism/leonida. Originally posted by vinceychu on 2026-11-25T17:18:54Z.
Claimed in the coordination issue as: TEST-RUN-GPU-TESTS-VERSIONED-LLVM-MC (#1608)
What and why
run_gpu_tests.pyandbench_wave64.pydefaulted--llvm-mctoos.environ.get("LLVM_MC", "llvm-mc"), somc_command.mc_command()never reachedversioned_llvm_mc(). With only Ubuntu'sllvm-21installed (llvm-mc-21and/usr/lib/llvm-21/bin/llvm-mc, no plainllvm-mc) the suite stops with the message that says that install "is found without further setup". The default is now left tomc_command();bench_wave64.pypasses an emptyLLVM_MC, whichmc_command()treats as unset.tests/test_mc_command.pygains a check that no tool pins the plain name (it fails on main for both scripts).Tested
python -I tests/test_mc_command.py,test_run_gpu_tests.py,test_run_gpu_tests_paths.py,test_run_gpu_tests_python_assembler.py,test_bench_wave64.py: OK.llvm-21from apt,LLVM_MCunset:run_gpu_tests.py --filter cs_imgatomic3dfails with the not-found message on main and passes (1/1) with this change.GPUs tested: NVIDIA GeForce RTX 5090, driver 595.99.02, Ubuntu 26.04.1
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.docs/design.md(n/a)Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:18:13Z.
One stale spot: the new guard test in this PR fails on current
main(bd6ba97ab) because a third script now pins the plain name.scripts/run_address_guard_gpu_test.pyarrived with the address-guard work (commit115667294, merged in #2350 after this PR was opened) and still has, at line 71:and then
shutil.which(a.llvm_mc.split()[0])at line 78. On a machine with only/usr/lib/llvm-21/bin/llvm-mc, that tool would printSKIP: llvm-mc not foundand return 77 before reachingassemble_to_s, even thoughmc_command()knows where it is — the same bug this PR fixes for the other two scripts.Two things to fold in when rebasing:
shutil.whichcheck should go throughmc_command.mc_command(a.llvm_mc)(then look atcmd[0]) or be dropped, sinceassemble_to_sreports a missing llvm-mc with the proper message itself.a.llvm_mc.split()cannot handleNone/"".python -I tests/test_mc_command.pyon unmodified main isRan 29 tests ... OK, and with this diff applied to current main it isRan 30 tests ... FAILED (failures=1)for that one file, so the PR will be red until the third script is updated.AI-assisted (verification only).
Imported from ubiquitarianism/leonida. Originally posted by vinceychu on 2026-11-26T19:32:29Z.
Thanks, @wavehs. Fixed in the new head: rebased onto current
mainandscripts/run_address_guard_gpu_test.pynow asksmc_command.mc_command()too, instead ofos.environ.get("LLVM_MC", "llvm-mc")plusshutil.whichon the plain name.Checked on Ubuntu 26.04 with only
llvm-21from apt andLLVM_MCunset, RTX 5090 (NVIDIA 595.99.02):scripts/run_address_guard_gpu_test.pyonmain:SKIP: llvm-mc not found(exit 77).PASS (guard on)andPASS (guard off).tests/test_mc_command.py: OK, includingtest_no_tool_pins_the_plain_name_as_its_default, which no longer finds any script that pins the plain name.Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:04:24Z.
Merged into
main(merge commit20264ffa0), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
b1c1ae97b).AI-assisted (Claude Code), posted for DadaCap.
Imported from ubiquitarianism/leonida. Originally posted by vinceychu on 2026-11-28T16:35:14Z.
Discord:
.fountainhead.(for the Contributor role check).Generated by Claude Code