The command has to exit with 2 and say the file is nested too deeply, without a
traceback, instead of exiting with the code that means different outputs.
read_report passes the file to json.loads, and a report nested a few hundred
thousand levels deep raised RecursionError, which main does not catch. The
command ended in a traceback with exit code 1, the code the tool documents as
'different outputs', so a corrupt file looked like a hardware difference. The
error is now a ValueError naming the file, and main reports it with exit code 2
like every other invalid report.
tools/hw-oracle needed Linux with ROCm, so Windows measurements went
through private runners. oracle_hip.py assembles and links template.s
kernels with the driver's amd_comgr and dispatches them with its HIP
runtime, with the same rows, padding, dispatch splitting and report as
oracle.c. hw_oracle.py selects it with HW_ORACLE_RUNTIME, by default on
Windows, and loads it in-process so the DLLs are loaded once per run.
The driver's comgr 2.9 numbers its assemble and link actions 0x8 and
0x7, not 0xA and 0x9, so each step tries both and keeps the one that
returns exactly one output of the expected kind.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
hardware_oracle_compare started compare_results.py in a new Python
process for every case, 77 interpreter starts. That takes 5-16 s
on the macOS relinker runners against the test's 20 s timeout, and the
x86_64 job timed out at 20.14 s in run 39103831688 on a pull request
that does not touch the oracle tools.
Call compare_results.main() in the test process with sys.argv patched
and stdout and stderr captured, and keep the identical and differing
cases as real subprocesses so the exit status of the script entry point
stays covered. The test drops to under 1 s.
LLD built for a MinGW host runs the COFF linker when ld.lld gets no -m option,
so it rejects the AMDGPU object with "unknown file type" and the
hardware_oracle test fails on Windows with WinLibs LLVM in PATH. Passing
-m elf64_amdgpu selects the ELF linker on every host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The template allocated a fixed 4 KiB of LDS, so kernels with immediate
offsets past it could not run. --lds (Python lds) sets the group segment
size in bytes, up to 64 KiB, with 4096 as the default.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
clang assembled every body as wave32, so a --wave64 body that used vcc
or an SGPR pair as a condition failed with "operands are not valid for
this GPU or mode". Pass -mwavefrontsize64 on wave64 runs.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
BREAKING CHANGE: CLI and Python callers must supply all seven float
controls. Add clamp, rounding and FP16 overflow settings so hardware
measurements cannot silently use an unintended mode.
Refs #981