Repository navigation
hw_oracle: build the launcher with MSVC when there is no MinGW gcc - #1255
Conversation
|
Independent CPU-side verification of
Static review of the changed logic also checks out: gcc keeps priority, The author's RX 9070 end-to-end run remains their hardware evidence. From the CPU checks, this looks ready; CI approval seems to be the only listed gate. |
find_cc() accepted only gcc, so a Windows contributor with Visual Studio (already required for the runtime) got "hardware oracle unavailable: no MinGW gcc". hw_oracle.c builds cleanly with cl /O1. - Order: LEONIDA_HOST_CC (gcc, or cl.exe / clang-cl), gcc on PATH or in C:\msys64, then on Windows a cl on PATH (Developer shell), then the Visual Studio vswhere finds, through its vcvars64.bat in a .cmd script. - cl's objects go to the oracle's work folder, its errors (on stdout) reach the Unavailable message, and the temporary launcher name ends in .exe so cl doesn't append another one. - Unit tests for the choice and the commands; docs/shader_validation.md says the runtime's VS is enough. Checked end to end on an RX 9070 with no gcc and no cl on PATH: the launcher is built through vcvars64.bat, salu_diff and crosslane_fuzz --oracle hw run with 0 mismatches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f668c7d to
7249dcb
Compare
|
Tested 7249dcb on Windows 11 (no AMD GPU: NVIDIA RTX 3060, driver 617.14): pass for the compiler selection and the MSVC build; the oracle itself was not run. Reviewed the diff ( Base is main e7584c5 (0 commits behind, merges clean). Python 3.12.8, MSVC 14.44 (portable, so no
Not run: the oracle on an AMD GPU, and the AI-assisted: this check was run and written with Claude Code; the numbers above are its unedited output. |
Claimed in the coordination issue as: #1218 (comment) (new BUILD item, follow-up to FUZZ-23)
What and why
tools/hw_oracle/runner.pyfind_cc()accepted only MinGW gcc. So a Windows contributor with an AMD GPU and Visual Studio gothardware oracle unavailable: no MinGW gcc for hw_oracle.c, although Visual Studio is already required for the runtime stage.hw_oracle.cbuilds cleanly withcl /O1(checked on the #1160 and #1202 heads; one C4996 warning forscanf).LEONIDA_HOST_CC(gcc, or now alsocl.exe/clang-cl);C:\msys64, unchanged and still first;clon PATH (a Developer shell);vswherefinds, with the same-requires ...VC.Tools.x86.x64query asscripts/build_runtime.ps1, through itsvcvars64.bat..cmdin the oracle's work folder. cmd.exe strips/c's outer quotes, and the VS path has spaces. The script puts the VS Installer folder on PATH first, becausevcvars64.batrunsvswhereitself and otherwise prints "'vswhere.exe' is not recognized" (asscripts/build_llvm_mc.ps1does)./Fo), not the caller's cwd;Unavailablemessage;.exe, so cl doesn't append a second one.docs/shader_validation.mdnow says the runtime's Visual Studio is enough.It merges cleanly with #1228, which touches
Oracle.__init__in the same file.Tested
Windows 11 Pro 26300, VS 2022 Build Tools (MSVC 14.44), Python 3.13, AMD Radeon RX 9070 (gfx1201, driver 26.11.2),
rocm-sdk-core==10.0.0clang:python -I tests/test_hw_oracle.py: OK. Two new tests cover:Unavailablenaming Visual Studio, gcc stays first, then a Developer-shell cl, then vcvars, and bothLEONIDA_HOST_CCforms;.cmdscript's quoting of a path with a space.clon PATH, the cached launcher deleted first, and hw_oracle: run on RDNA4 (gfx12xx); an unknown architecture is unavailable, not a traceback #1228 merged in for gfx1201:find_cc()returned('vcvars', '...\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat');runner.pybuilt the launcher and printedhardware oracle ready: device=AMD Radeon RX 9070 arch=gfx1201;salu_diff --oracle hw --programs 500 --seed 7: 275 pass, 0 mismatch, 225 skipped;crosslane_fuzz --oracle hw --wave both --programs 200 --seed 21: 100/100 wave32, 100/100 wave64, 0 mismatch.tests/test_crosslane_fuzz.py: OK.python -m compileall -q tools tests: OK.Not tried: an MSYS2 machine (that path is unchanged), and clang-cl as
LEONIDA_HOST_CC, which is only covered by the unit test.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code