upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/shims/file_system.cpp
diff options
context:
space:
mode:
authorerrusso <s.russo06@icloud.com>2026-11-22 23:40:40 +0100
committererrusso <s.russo06@icloud.com>2026-11-22 23:40:40 +0100
commitf23b69060cc3dd953a26e23f6cd81627f054e4b5 (patch)
treeb946e9dc090df40223a31d23fe6e81aa0b4b9916 /runtime/shims/file_system.cpp
parentaa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff)
hw_oracle (Linux): run the LDS fuzzers through libdrm
The libdrm launcher refused a kernel whose descriptor has a group segment and capped its output at 4096 words, so lds_fuzz --oracle hw was exit 77 on Linux and no LDS program ran on RDNA2 outside Windows. Both are now gone; docs/shader_validation.md records the gfx1036 counts. - drm.py: program COMPUTE_PGM_RSRC2.LDS_SIZE (bits 15..23, 512-byte units) from the descriptor's group segment instead of refusing it. The assembler leaves that field 0 (measured: 4096 bytes of LDS give group 4096 and rsrc2 0x84), so the launcher fills it as the HIP runtime does. Only scratch memory (private) and COMPUTE_PGM_RSRC3 stay unsupported. - hw_oracle_drm.c: the output buffer takes 1..16384 words, matching the Windows launcher, so a 64x64 image_fuzz case (16384 words) fits. - asm.py: a wrapped (non-raw) kernel's LDS goes into its descriptor too, so the Linux launcher has a group segment to read. - lds_fuzz.py: the "more than 4096 words" wording no longer applies. Tests: test_hw_oracle.py gains a descriptor unit test (group segment to LDS_SIZE, 65536 ceiling) and two OnHardware tests (a kernel that writes, barriers and reads back LDS; 8192 words from 1024 threads), plus a check that LDS reaches the descriptor and metadata of a wrapped kernel. Verified on the integrated Radeon of a Ryzen 7 7700X (gfx1036, RDNA2, Linux 7.3.5-zen1-1-zen, libdrm 2.4.134, AMD clang 23.1.5): lds_fuzz --oracle hw --programs 500 --seed 1 matches 0 of 1000 (wave32+wave64) mismatches, image_fuzz --oracle hw --programs 120 --seed 1 0 of 120. AI-assisted (OpenCode).
Diffstat (limited to 'runtime/shims/file_system.cpp')
0 files changed, 0 insertions, 0 deletions