Repository navigation
vk_fuzz_run: read a wave32 one-word dump from vk_compute_test's larger buffer - #7756
Open
Sangonapou wants to merge 1 commit into
Open
Sangonapou wants to merge 1 commit into
Sangonapou wants to merge 1 commit into
Conversation
…r buffer run_programs required a VKC_DUMP of exactly 4 * words * wave bytes. vk_compute_test's output buffer is at least one 64-thread group of words (VKC_OUT_WORDS only raises it), and VKC_DUMP writes the whole buffer, so wave32 with words=1 (128 bytes asked) got a 256-byte file and every program came back as "vk_compute_test exit 0". words=2, 4 and 8 were not affected. read_dump() now takes the first words * wave words of a dump at least that long, and a missing or short dump says so instead of reporting exit 0. Unit test in tests/test_vk_fuzz_run.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Checked read_dump at c7d84c2 on Windows with Python 3.12.13 and 3.14. Exercised all eight supported shapes (32/64 lanes × 1/2/4/8 words), encoding the lane and word index into every value. For each shape I checked an exact payload, one trailing byte, 513 trailing bytes, and a payload one byte short. All 32 checks passed on each interpreter: lane and word order stayed intact, trailing bytes were ignored, and the one-byte truncation returned None. CPU-side parser check with synthetic files, AI-assisted. |
|
Tested
AI-assisted. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: claim in #7694
What and why
tools/vk_fuzz_run.run_programsaccepted aVKC_DUMPonly when it was exactly4 * words * wavebytes.vk_compute_test's output buffer is at least one 64-thread group of words (its header:VKC_OUT_WORDSonly raises it), andVKC_DUMPwrites the whole buffer. So a request under 64 words (wave32 withwords=1: 128 bytes asked, 256 written) failed the check, and every program came back asvk_compute_test exit 0even though it had run and stored the right words. The docstring allowswords1, 2, 4 and 8; 2, 4 and 8 were never affected, and no current caller passes 1, so nothing in the repo hit it. I ran into it while GPU-testing #7293 (v_dot4_i32_i8readback with one word per program).read_dump(path, words, wave)returns the firstwords * wavewords of a dump at least that long, orNonewhen it is missing or short.vk_compute_test: no dump of N bytes or moreinstead ofvk_compute_test exit 0.Tested
NVIDIA GeForce RTX 3080 Ti Laptop (subgroup 32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300); runtime built from
4078faaawithscripts\build_runtime.ps1(MSVC 19.51);llvm-mc23.1.6 (conda-forge).Two real programs (
v_add_nc_u32of 5 and 3;v_not_b32of0x12345678) throughrun_programsat wave32:wordsmainvk_compute_test exit 0(both)[8],[0xedcba987]maintests/test_vk_fuzz_run.py: 12 OK (newtest_read_dump_takes_the_first_wave_of_a_larger_buffer: a 64-word dump for wave32words=1, an exact-size dump, a short and a missing one).tests/test_fmisc_diff.py(avk_fuzz_runcaller): 25 OK.python -m compileall,scripts/check_no_game_data.pyon both files: clean.Doesn't overlap #4426, which changes other lines of the same file.
AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code