mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #180] [MERGED] check: mesh gradient check fails NaN readbacks and judges ms_wave_info_s3 on 32-wide devices (OLD-5262, OLD-5273) #231
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#231
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/180
Author: @ItsMrDubey
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:reviewbd-test-checks📝 Commits (2)
0e0db89check: a NaN in the mesh gradient readback is a failing pixele1e6343check: ms_wave_info_s3 is judged on a 32-wide device, only ms_w64x_ballot needs 64 lanes📊 Changes
2 files changed (+48 additions, -4 deletions)
View changed files
📝
runtime/test/shaders/check.py(+8 -4)📝
tests/test_shader_checks.py(+40 -0)📄 Description
Claimed in the coordination issue as: OLD-5262, OLD-5273 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7119646964)
What and why
Both are in
mesh_w64x_testofruntime/test/shaders/check.py, the standalone judge ofms_w64x_ballotandms_wave_info_s3.abs(got - want) > 1e-3. That comparison is false for NaN, so a readback full of NaN passed. Now every component has to be within the tolerance (abs(got - want) <= 1e-3), and NaN fails.run_gpu_tests.pyalready rejects non-finite frames inframe_problem.None("SKIP (full 64-wide compute subgroups unavailable)") for both shaders.ms_wave_info_s3doesn't depend on the subgroup width: the translator sets itss3[27:24]wave id fromLocalInvocationIndex >> 6(test_mesh_s3_wave_id_emits_local_index_shift_and_bfe).run_gpu_tests.pyalready judges it on every device and skips onlyms_w64x_ballot. The standalone check now does the same: onlyms_w64x_ballotstill needs 64 lanes (orLEONIDA_W64_EMULATE=1).Two commits, one per ID. They change neighbouring lines of the same function, so they're in one PR.
Tested
Windows 11, Python 3.11.9, no GPU needed. A fake
vk_harness(patchedsubprocess.run) writes the 64x64 RGBA32F readback and prints the device's subgroup range.origin/main: an all-NaN readback forms_w64x_balloton a32..64device returned''(pass). Correct and wrongms_wave_info_s3frames on a32..32device both returnedNone(skip).4096 of 4096 pixels differ (blue nan ...). On32..32, the correct frame gives''and the wrong one fails.ms_w64x_balloton32..32still returnsNone.MeshGradientChecksintests/test_shader_checks.py. Onorigin/main, 2 of its 3 tests fail. With the fix,python -I tests/test_shader_checks.pypasses all 87 tests.python -I tests/test_gpu_unsupported_stage.py,test_gpu_blocked_program.py,test_run_gpu_tests.py,test_gpu_build_dir.py,test_gpu_test_timeout.py,test_run_gpu_pixel_checks.py,test_partial_wave_subgroup.py,test_bary_persp_oracle.py,test_build_runtime_fallback.pyandtest_sampler_lod_probe.pyall pass. So dopython -m pytest tests/test_mesh_compute.py tests/test_f16_hw_words.py(44 passed, 18 skipped).python -I scripts/check_no_game_data.pyon both changed files: clean.AI-assisted: yes
Checklist
docs/design.md.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.