Repository navigation
bvh_gpu_smoke: raise default --heap-bytes from 1 MiB to 16 MiB - #6633
Conversation
With the default --table-qword 0x2000, BuildKDOP reads ~2 MiB and RadixCount writes ~8 MiB, so the old 1 MiB heap triggered VK_ERROR_DEVICE_LOST (-4) on strict MMU drivers such as NVIDIA RTX 5060 Ti.
|
Tested b5b6504 on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files): pass I could not check the GPU results in the description (RTX 5060 Ti, What I ran:
Nits, none blocking:
AI-assisted (Claude Code). |
|
Tested b5b6504 merged with main 8575d36 on Linux/Python 3.12.16: pass Merge was clean (tools/bvh_gpu_smoke.py, tests/test_bvh_gpu_smoke.py).
Diff read: only the Not run: no GPU or vk_compute_test was involved, so the claim in the comment that a 1 MiB heap faults on NVIDIA and that BuildKDOP/RadixCount touch about 2 MiB and 8 MiB is the author's and is not something these tests exercise. |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
tools/bvh_gpu_smoke.py:main() raises the default --heap-bytes from 1 MiB to 16 MiB, with a comment noting BuildKDOP uses about 2 MiB and RadixCount about 8 MiB at the default --table-qword 0x2000. tests/test_bvh_gpu_smoke.py:test_default_heap_bytes_is_16_mib stubs out the subprocess, inspects VKC_HEAP_INIT, VKC_OUT_WORDS and VKC_DUMP, and asserts both dispatches get 4M words / 16 MiB / 0x2000.
Why merge
The old 1 MiB default faulted on NVIDIA at stock settings. Test pins the exact environment both dispatches receive.
Verdict: Approve
Summary
Why mergeThe old 1 MiB default faulted on NVIDIA at stock settings. Test pins the exact environment both dispatches receive. Verdict: Approve |
Senya01
left a comment
There was a problem hiding this comment.
Tested merged 7c0821659 on NVIDIA RTX 5070 Ti, driver 617.14, Windows 11 build 26300. Using the 52 BVH modules built by translator 07f81e760 with wave64 emulation and a 32 KiB shared-memory cap, the default 16 MiB Vulkan smoke run with validation enabled reproduced 47/49 pass and 6/6 byte-exact checks pass. The two failures were DecompressHeader and RadixAlloc, both vkQueueWaitIdle returning VK_ERROR_DEVICE_LOST (-4). All 52 compute pipelines could be created separately on this GPU.
I rebuilt vk_compute_test from aa5cd8120 and repeated the two failing dispatches individually with the same inputs. Both failed at 16 MiB, with no validation error or VUID captured before the driver error. At 1 MiB, DecompressHeader also failed. RadixAlloc exited successfully on one isolated dispatch, then failed in the follow-up smoke check, so the smaller heap did not give a stable pass here.
AI-assisted: yes. Runs and report by OpenAI Codex (gpt-6.2-sol).
Claimed in the coordination issue as: comment
What and why
tools/bvh_gpu_smoke.pydefaulted--heap-bytesto1 << 20(1 MiB). With the default--table-qword 0x2000,BuildKDOPaccesses ~2 MiB (passes only at >= 3 MiB on RTX 5060 Ti) andRadixCountaccesses ~8 MiB (passes only at >= 8 MiB on RTX 5060 Ti).On GPUs with strict GPU MMU page-fault reporting (measured on NVIDIA GeForce RTX 5060 Ti, Windows 11, driver 621.01, with and without Vulkan validation), both programs exited 1 with
VK_ERROR_DEVICE_LOST(-4) under the 1 MiB default even though their translated SPIR-V executes cleanly when given a large enough heap buffer.--heap-bytesintools/bvh_gpu_smoke.pyfrom1 << 20(1 MiB) to16 << 20(16 MiB), leaving explicit--heap-bytesoverrides unchanged.test_default_heap_bytes_is_16_mibintests/test_bvh_gpu_smoke.pyrunningsmoke.main(["--spirv", ..., "--no-validation"])without--heap-bytesagainst a mockedsubprocess.runandfind_vk_compute_testto checkVKC_OUT_WORDS, the 16 MiB heap image length, and the seeded0x2000table qword.No overlap or conflict with
#5085,#5130,#6291, or#6472.Tested
upstream/maintools/bvh_gpu_smoke.py):python -I tests/test_bvh_gpu_smoke.py -k test_default_heap_bytes_is_16_mibfails with[(262144, 1048576, 8192), ...] != [(4194304, 16777216, 8192), ...].python -I tests/test_bvh_gpu_smoke.py:13 tests OKpython -I tests/test_check_no_game_data.py:8 tests OKpython -I tests/test_docs_cli_flags.py:3 tests OKpython -m py_compile&git diff --check: clean, LF line endings preserved.1 MiB):45 of 49 pass; 7 changed heap words beyond running; exit 1 4(BuildKDOP,DecompressHeader,RadixAlloc,RadixCountfail with-4).16 MiB,--heap-bytesomitted):47 of 49 pass; 8 changed heap words beyond running; exit 1 2(BuildKDOPpasses with0changed words,RadixCountpasses with2changed words,checked: 6 of 6 write exactly what they should; onlyDecompressHeaderandRadixAllocremain).AI-assisted: yes (Antigravity)
Checklist
docs/design.md, with how it was confirmed. (no translator change)