Repository navigation
Conversation
|
Tested fb32681 merged with main 8575d36 on Windows/Python 3.13.1 (llvm-mc 23.1.6, spirv-as/spirv-val from the leonida-tools folder) and on Linux/Python 3.12.16: pass Merge was clean (tools/rdna2_decode.py, tools/rdna2spirv.py, tests/semantic/test_image_gather4_l_dims.py). Windows/3.13.1 (all three tests need llvm-mc and spirv-val, so this is the run that counts):
Linux/3.12.16 (no llvm-mc, spirv-as or spirv-val here, so the round trip skips and the matrix test only translates, without validating the SPIR-V):
Not run: any GPU, so the cube-as-2D-array view, the layer clamp (RoundEven then clamp to size-1) and the new a16 address count are checked by translation and validation only, not against hardware. |
|
AI-assisted independent GPU verification of Please record the new array/cube lowering and verification scope in the translator contract table in |
|
I reproduced a seamless cube discrepancy and an ignored instruction bit on exact head fb32681 using an RTX 3060 with Khronos validation. Plain seamless cube _l clamped taps to the selected face on two independent edges. At +Z left, native Vulkan gather returned [29,49,30,10]/255, while the translated shader returned [49,49,30,30]/255. A scratch guard rejected the seamless cases and preserved the clamped controls. For 2D-array _l, flipping instruction UNRM alone produced identical SPIR-V at both tested sizes. Bypassing the coordinate multiply made both draws agree with equivalent normalized coordinates and explicit texel reads. The parent rejected both forms. Native RDNA2 behavior of the exact array UNRM combination remains unverified. AI-assisted. |
|
Tested
No GPU fixture in the suite runs |
|
Tested fb32681 merged onto main 37f2151 on Windows 11 Pro, Intel i7-14700KF, CPython 3.11.0 (venv: pytest 9.2.0, numpy 2.4.6, Pillow 13.0.0; numpy is below the 2.5.5 pin because 2.5 needs Python 3.12), CPU only: pass, with notes.
Review notes:
AI-assisted (Claude Code). |
Claim: #6910 (comment)
Summary
Adds
SQ_RSRC_IMG_2D_ARRAYandSQ_RSRC_IMG_CUBEsupport (includinga16andd16) forimage_gather4_landimage_gather4_l_o:tools/rdna2spirv.py:image_gather4_lguard to accept 2D, 2D_ARRAY, and CUBE (ncoord in (2, 3)andnot is3d, requiringlen(f) >= ncoord + 1), keeping 1D and 3D refused asUnsupported.(s, t, face)viacube_coords(f)and read LOD fromf[ncoord].ncoord == 3, queryOpImageQuerySizeLod %v3int, round and clampf[2]to[0, sz.z - 1]viaRoundEven/SMax/SMin, emit%v3inttexel coordinates forOpImageFetch, and passdim:SQ_RSRC_IMG_2D_ARRAYasview_dimtoimage_read_typedfor CUBE.tools/rdna2_decode.py:_mimg_addr_countundera16to pack coordinates and trailing lod/clamp/mip continuously (fixed32 + (packable + 1) // 2), verified againstllvm-mc -mcpu=gfx1030(e.g.,image_gather4_lon 2D_ARRAY/CUBE witha16uses 2 address VGPRs;image_gather4_l_ouses 3).tests/semantic/test_image_gather4_l_dims.py:image_gather4_l/image_gather4_l_ox{2D_ARRAY, CUBE}x{normal, a16, d16, a16+d16}x{dmask:0x1, 0x2, 0x4, 0x8}x{ps, cs}withspirv-val --target-env vulkan1.2.llvm-mc -mcpu=gfx1030binary decode ->rdna2_decode->rdna2spirv->spirv-valround-trip tests.dmask, and under-sized address ranges still raiseUnsupported.Verification (Windows 11 + NVIDIA GeForce RTX 5090)
python -m unittest discover -s tests/semantic -p test_image_gather4_l_dims.py -v(withllvm-mc21-mcpu=gfx1030&spirv-valVulkan 1.2): 3/3 passed (128 matrix cases + 16 binary round-trips + 8 negative cases).python -m compileall -q tools tests: OK.test_sampled_dynamic_index.py,test_image_coherent.py,test_format_decode_branch.py,test_norm_decode.py): all passed.scripts/run_gpu_tests.py --filter gather --require-passwithLEONIDA_VK_VALIDATION=1andLEONIDA_W64_EMULATE=1on RTX 5090: 3/3 passed (ps_gather_border,ps_gather_sampler_lod,ps_gather_wrap, 4096/4096 pixels exact).git diff --check: clean.AI-assisted (Gemini 4 Neon).