Repository navigation
victory: meshdump surveys mesh and compute programs for group shape, LDS and divergent barriers - #1774
victory: meshdump surveys mesh and compute programs for group shape, LDS and divergent barriers#1774ryosen0 wants to merge 2 commits into
Conversation
A hang diagnosis needs both halves of a dispatch: meshdump lists each program's group shape, LDS bytes, s_barrier count, and whether a barrier sits in a block only some lanes reach (a lane-dependent branch dominates the path) - such a barrier deadlocks a group on a host whose wave is narrower than the console's. --compute adds Cs programs (group dims from ComputeIo.threads, LDS from rsrc2) to the same analysis. Used on a retail pack's 11 suspect hashes: 5 mesh (threads=128 lds=0 barriers=2, all-lanes) and 6 compute; divergent-barrier count 0 - the barrier hypothesis closed at ISA level on an RTX 3060 Ti. Assisted-by: DeepSeek Harness (GPT-6.2 Sol)
VIctory V2: community PRs, merged and testedOpen PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (70564ae, Windows 11 x64, Rust 1.98.1 MSVC):
cargo test -p victory— 1 passed, 0 failedcargo clippy -p victory --all-targets— 0 warningscargo xtask policy— ok
Clean meshdump CLI subcommand surveying mesh/compute group shapes, LDS usage, and divergent barriers, documented in README.md. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Static review only: apps/Windows-only (CLI/run paths) — nothing compiles on macOS; source review of the diff.
meshdump surveys mesh and compute programs for group shape/LDS: apps-side analysis tool, 11K. Useful diagnostic; Windows-only.
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
What. A diagnostics subcommand:
Per container (BLAKE3 of the shader bytes, first 16 hex, the same hash the runtime logs), for each mesh program - and with
--computeeach compute program - it prints one line:ms threads=N lds=B verts=V prims=P(mesh) orcs threads=XxYxZ lds=B(compute);wave64flag and thes_barriercount;DIVERGENTwhen a barrier sits in a block reachable only through one side of a lane-dependent branch,all-lanesotherwise, plus the number of lane-dependent branches;--isaadditionally prints the decoded GFX10 instructions with machine offsets;programs N, with barriers N, divergent-barrier N.The verdict comes from the IR and the control-flow structure (
ir::build+structure::structure), not from text matching: for every lane-dependent branch, reachability from the entry is recomputed with each side of the branch removed; a barrier block that becomes unreachable when one side is removed, but is reachable through the other, is only executed by some lanes.--hashfilters containers, so a DRED report's hashes can be surveyed directly.Why. On hosts whose wave is narrower than the console's, an
s_barrierin a block only some lanes reach deadlocks the group - one of the standing hypotheses in the NVIDIA world-hang threads (#71, #619, #778). Checking it by hand means decoding each suspect program and tracing branches around every barrier. The existing diagnostics answer runtime questions (#638: what the hang waits for; #509: execution census; #1183: translation census; the new title memory peeks in7000573: runtime buffer/slot state); none of them surveys the static group shape / LDS / barrier layout of the pack's mesh and compute programs, which is what a hang report's hash list needs first. This tool closes that gap in one command per report.Two commits:
06f29c9(the survey, mesh + compute, and the CLI wiring) and6c182d8(README: the commands list and a short usage note). 212 added lines, no deletions.Tested.
threads=128 lds=0 barriers=2 all-lanes) and 6 compute programs; divergent-barrier count 0. That closed the barrier hypothesis at the ISA level for those removals and moved the investigation on.--hashfiltering,--isaoutput and the summary line checked against the same containers by hand (decoded instructions and barrier offsets match).6c182d8, basemain70564ae.cargo test --workspace --exclude victory-gpu -- --test-threads=4on the PR head6c182d8: 185 passed / 0 failed / 4 ignored across the other crates (12 test binaries);victory-shader: 206 passed / 3 failed / 2 ignored.cargo test -p victory-gpu --lib -- --test-threads=1: 7 failed, then the test binary aborts (0xc0000409, onresource::tests::buffer_data_reaches_the_host_texture). All of these failures reproduce identically on the untouched base70564aeon this machine (the shader ones report "dispatch failed: Not enough memory resources" on the 8 GB NVIDIA card; the GPU failure sets are name-for-name identical), so they are pre-existing environment failures, not changes from this PR - the diff touches onlyapps/victoryand README. The three shader tests:emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride,emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,emit::synthetic_tests::gathers_at_a_level_match_the_hardware.Not tested. GPU execution (the tool only reads and decodes files; no device is created). Packs other than the one retail title we have. Geometry and other stages (skipped by design).
Notes. No runtime behaviour changes: a new subcommand and a README entry only; no edits outside
apps/victory/srcandREADME.md. The analysis reuses the existingvictory_shaderIR/structure APIs; written from scratch for this repository, nothing ported.AI-assisted; used on a real RTX 3060 Ti.