tests: make the workspace tests pass on an NVIDIA machine and stop the loader test hang #48

Manually merged
github merged 4 commits from github-bot/gh-48 into main 2026-12-05 20:02:27 +00:00 AGit
Owner

@⁠Kal0s-design on GitHub · 2026-12-05 18:59 UTC · original
Kal0s-design:tests/reliable-on-nvidia → main · +37 −7 · 6 files · 4 commits · merged 2026-12-05 19:56 UTC

Four test fixes that together make the workspace tests reliable on a developer machine, so a red test means something again.

The first is mine. Three indirect clamp tests (host_list_budget_starts_empty_at_each_submission, warp_a_group_charges_its_records_in_lane_order, warp_batch_charges_every_execution) failed on any PC with an NVIDIA card. They run on WARP but compile the clamp with the default of the host, and nvidia_mode turns on by itself when the card is NVIDIA, which switches VICTORY_INDIRECT_REST off. The tests expect the non-NVIDIA default, so they saw the other default working as intended. In test builds rest() now resolves as on a non-NVIDIA host, and the NVIDIA default keeps its own check in rest_for_defaults_off_only_under_nvidia_mode. With VICTORY_INDIRECT_REST=1 forced on the old code all 19 indirect tests already passed, which is how I narrowed it down.

The second is also mine. quad_read_in_a_branch_reads_the_left_lanes_register lowered its program with host wave 0, which for the wave64 case asks for 64-lane waves, and a host whose waves are 32 lanes at most refuses that pipeline, so on NVIDIA it failed at compute_pipeline with "The parameter is incorrect" before checking anything. A real run lowers for the card's widest wave, and the other permlane test already passes WaveLaneCountMax. It now lowers for host.translation_caps()'s widest wave. On an NVIDIA card it then passes for both console wave sizes, which also exercises the split two-wave path for this case.

The other two come from upstream ReVIctory unchanged, authors kept. 82aa45a fixes a real hang in the victory-loader tests. MiniDumpWriteDump suspends every thread, and a test thread suspended inside LoadLibraryEx holds the loader lock the dump needs, so a parallel cargo test could sit at zero CPU forever. Here it hung twice in one evening. The cherry-pick needed one manual resolution, two module declarations upstream has in the same spot (ps5_rumble, vehicle_notch) that this fork doesn't have, so only the lock went in. 542aa65 makes the table-parts wait test robust on slow runners.

Tested on this branch merged with current main, on one NVIDIA desktop card. The three indirect tests pass where they failed before, victory-loader passes 112 in a quarter of a second instead of hanging, and clippy -D warnings reports nothing new in the touched crates (the three lints already on main aside). Of the victory-shader tests that run on the hardware adapter, three still fail on NVIDIA. The ISA comparison against RDNA2 differs there in the sign of zero for v_fma_mix_f32 and by an ulp in v_log_f32, the float d16 test sees the card drop the sign of a 16-bit NaN, and the 16-bit integer table view case is a real translation issue that gets its own PR. One victory-gpu test, watch's no_mapping_is_lost_between_askers, failed once in a full run while other builds were loading the machine and passed five times out of five on its own. It asserts that readers got at least one answer while mappers race them, so it can starve under load, and none of these changes touch it.

AI-assisted: yes

🤖 Generated with Claude Code

**@⁠Kal0s-design** on GitHub · 2026-12-05 18:59 UTC · [original](https://github.com/VGLALALA/ReVictory-RDNA3/pull/48) `Kal0s-design:tests/reliable-on-nvidia` → `main` · +37 −7 · 6 files · 4 commits · merged 2026-12-05 19:56 UTC Four test fixes that together make the workspace tests reliable on a developer machine, so a red test means something again. The first is mine. Three indirect clamp tests (host_list_budget_starts_empty_at_each_submission, warp_a_group_charges_its_records_in_lane_order, warp_batch_charges_every_execution) failed on any PC with an NVIDIA card. They run on WARP but compile the clamp with the default of the host, and nvidia_mode turns on by itself when the card is NVIDIA, which switches VICTORY_INDIRECT_REST off. The tests expect the non-NVIDIA default, so they saw the other default working as intended. In test builds rest() now resolves as on a non-NVIDIA host, and the NVIDIA default keeps its own check in rest_for_defaults_off_only_under_nvidia_mode. With VICTORY_INDIRECT_REST=1 forced on the old code all 19 indirect tests already passed, which is how I narrowed it down. The second is also mine. quad_read_in_a_branch_reads_the_left_lanes_register lowered its program with host wave 0, which for the wave64 case asks for 64-lane waves, and a host whose waves are 32 lanes at most refuses that pipeline, so on NVIDIA it failed at compute_pipeline with "The parameter is incorrect" before checking anything. A real run lowers for the card's widest wave, and the other permlane test already passes WaveLaneCountMax. It now lowers for host.translation_caps()'s widest wave. On an NVIDIA card it then passes for both console wave sizes, which also exercises the split two-wave path for this case. The other two come from upstream ReVIctory unchanged, authors kept. 82aa45a fixes a real hang in the victory-loader tests. MiniDumpWriteDump suspends every thread, and a test thread suspended inside LoadLibraryEx holds the loader lock the dump needs, so a parallel cargo test could sit at zero CPU forever. Here it hung twice in one evening. The cherry-pick needed one manual resolution, two module declarations upstream has in the same spot (ps5_rumble, vehicle_notch) that this fork doesn't have, so only the lock went in. 542aa65 makes the table-parts wait test robust on slow runners. Tested on this branch merged with current main, on one NVIDIA desktop card. The three indirect tests pass where they failed before, victory-loader passes 112 in a quarter of a second instead of hanging, and clippy -D warnings reports nothing new in the touched crates (the three lints already on main aside). Of the victory-shader tests that run on the hardware adapter, three still fail on NVIDIA. The ISA comparison against RDNA2 differs there in the sign of zero for v_fma_mix_f32 and by an ulp in v_log_f32, the float d16 test sees the card drop the sign of a 16-bit NaN, and the 16-bit integer table view case is a real translation issue that gets its own PR. One victory-gpu test, watch's no_mapping_is_lost_between_askers, failed once in a full run while other builds were loading the machine and passed five times out of five on its own. It asserts that readers got at least one answer while mappers race them, so it can starve under load, and none of these changes touch it. AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Three indirect tests failed on any machine with an NVIDIA card:
host_list_budget_starts_empty_at_each_submission,
warp_a_group_charges_its_records_in_lane_order and
warp_batch_charges_every_execution. They expect a record that does not
fit in the list's budget to take the rest of it, which is the default
everywhere except under nvidia_mode, and nvidia_mode turns on by itself
when the PC's card is NVIDIA, even though the tests run on WARP. So the
clamp they compiled took nothing for a refused record and the next one
that fitted ran, which is exactly the other default working as intended.

In test builds rest() now resolves as on a non-NVIDIA host. The NVIDIA
default keeps its own check in rest_for_defaults_off_only_under_nvidia_mode.
victory-gpu now passes 695 of 695 on a machine with an NVIDIA card, where
it failed 3 before; VICTORY_INDIRECT_REST still overrides both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Parallel cargo test could hang: MiniDumpWriteDump suspends every thread, and a
test thread suspended inside LoadLibraryEx holds the loader lock the dump's own
module load needs. A test-only RwLock lets load tests run in parallel with each
other, while the minidump test excludes them for the duration of the dump.
Production paths are unchanged.

(cherry picked from commit 82aa45aa6d9354b0dba9ce35e39237309b7b1106)
The whole-walk bound assumed the waiter thread gets its first turn promptly:
a loaded CI runner started it late and measured 58.6 ms of a 100 ms walk.
Hold a part for 200 us (400 ms in all) and bound the whole walk at 100 ms
and the between-parts wait at 80 ms, so scheduling jitter cannot decide it.

(cherry picked from commit 542aa6555a80dd22ae0d6627bd10e032fba499ba)
quad_read_in_a_branch_reads_the_left_lanes_register lowered its program
with host wave 0, which for the wave64 case asks for 64-lane waves. A
host whose waves are 32 lanes at most (NVIDIA) refuses that pipeline,
so the test failed there at compute_pipeline with "The parameter is
incorrect" before checking anything. A run lowers for the card's widest
wave instead, and the other permlane test already passes the host's
WaveLaneCountMax.

The test now lowers for host.translation_caps()'s widest wave: one
hardware wave on a 64-lane host as before, and two exchanging 32-lane
waves on a 32-lane one. On one NVIDIA desktop card it passes for both
console wave sizes, which also checks the split-wave path for this
case, where it never got that far before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 19:04:54 +00:00
github-bot force-pushed github-bot/gh-48 from a6eb5646da to 56db046a9f 2026-12-05 19:50:57 +00:00 Compare
github manually merged commit 26691c2f8c into main 2026-12-05 20:02:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.