upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/vk_queue_constructor_oom_test.cpp
diff options
context:
space:
mode:
authorPyotr Karbovskiy-Kjellman <pyotr.kkjellman@gmail.com>2026-11-23 19:13:17 +0100
committerPyotr Karbovskiy-Kjellman <pyotr.kkjellman@gmail.com>2026-11-23 19:30:59 +0100
commit634370e59a2aa2e161136ed570d30ee9aeff9047 (patch)
tree8aafc37ad632ba7e9845732a9f641ed5fd6124b1 /runtime/test/vk_queue_constructor_oom_test.cpp
parentdde82f27e994337094afc476ded0b1426f6e87e2 (diff)
hw_oracle: run the Linux DRM launcher on GFX11 and GFX12
hw_oracle_drm.c refused every compute engine but version 10, so on an RX 9070 (gfx1201, engine 12.0) `f32_fuzz.py --oracle hw` could not run at all: 'hardware oracle unavailable: compute engine 12.0: only version 10 (GFX10, RDNA1 and RDNA2) is supported'. The registers the launcher writes sit at the same SH offsets on GFX10, GFX11 and GFX12 — Mesa's register JSON and AMD's PAL offset headers (gfx9_plus_merged_offset.h, gfx12_merged_offset.h) agree on them, and PAL's gfx12CmdUtil.cpp still builds plain SET_SH_REG — so only the preamble and the cu-mask writes branch: - Engines 11 and 12 take the gfx11 init of libdrm's own dispatch test (tests/amdgpu/shader_test_util.c, 2.4.115): REQ_CTRL on its own, the four COMPUTE_USER_ACCUM registers, no CP_COHER_START_DELAY. The checksum stays in the SH space, as PAL writes it on GFX11 (gfx9PipelineChunkCs.cpp): libdrm's gfx11 path sends it as UCONFIG 0x22a, which does not reach the register. - The indexed COMPUTE_STATIC_THREAD_MGMT_SE0..3 writes stop at engine 11: GFX12's SE masks reset to 0xffffffff (AMD's gfx12_merged_default.h) and neither PAL nor RADV touches them there. - arch_name covers the GC 11 and GC 12 families with Mesa's ac_identify_chip and amdgpu_asic_addr.h ranges (NV4 also needs the IP minor, for gfx1210; amd_family.c names GFX1156 gfx1153 too); a chip only labelable by generation gets a representative, which drm.py maps the way it already mapped gfx10xx. The engine-version check takes 10, 11 and 12; the gfx10 stream itself is unchanged. drm.py's ELF and descriptor parsing needed nothing: the code-object-v5 layout it reads is generation-independent, and COMPUTE_PGM_RSRC2's LDS_SIZE is bits 15..23 in 512-byte units on all three generations (Mesa ac_binary.c). asm.py already documents GFX12 (b94733a04). tests/test_hw_oracle.py: the device-line-to-arch mapping with the new fallbacks, and a launcher build test that compiles hw_oracle_drm.c exactly as drm.py does, wherever gcc and the libdrm_amdgpu headers are installed and without a GPU. Verified on hardware: the author's RX 9070 (gfx1201, engine 12.0, Linux/RADV) ran --oracle hw over the five min/max/med3 ops, 583 f32 programs: 451 match, 0 mismatch, 2 known deviation, 0 assembler rejections; a curated 39-program run before it matched on all 14 judged. No RDNA3 hardware was dispatched — the gfx11 stream mirrors libdrm's hw-proven gfx11 test. CPU: tests/test_hw_oracle.py 59 OK (3 skips), tests/test_f32_fuzz.py 29 OK (1 skip), tests/test_f32_fuzz_gfx12.py 7 OK, compileall clean. AI-assisted (GLM-5.3).
Diffstat (limited to 'runtime/test/vk_queue_constructor_oom_test.cpp')
0 files changed, 0 insertions, 0 deletions