Commit Graph

8 Commits

Author SHA1 Message Date
d1f53516d3 ci: fix PR-specific translator, runtime test, and docs/check failures
- docs/design.md: escape bare pipes in wide scalar load table row
- runtime/README.md: document LEONIDA_BEFORE_EXECUTE_COALESCE and LEONIDA_CLWB_PATCH
- .github/workflows/runtime.yml: add descriptor_sources.py and heap_index_census.py path triggers
- tools/ptr_truncation_census.py: accept extra= kwarg in shader_meta.collect capture hook
- tools/shader_diff.py: disable FTZ32 during cpu_ref differential comparison (cpu_ref preserves denorms)
- tests/test_translate.py: update wave32 bpermute, ballot-based WQM, and deduplicated uvec4 OpImageFetch assertions
- runtime/test/replay_state_cache_test.cpp: add always-true gl_FragCoord.x >= 0.0 scalar select guard in build_fs_spirv to avoid Mesa llvmpipe linear-fastpath push-constant bug
- runtime/test/vk_gpu_profile_test.cpp: skip positive-duration checks on Apple Paravirtual GPUs returning constant zero-span timestamps while keeping all structural/query checks

AI-assisted: Antigravity (Gemini 4 Neon). Verified with full translator-tests pytest suite (2004 passed), PR-specific CI/check unit tests, and replay_state_cache_test + vk_gpu_profile_test on llvmpipe and Radeon iGPU (VVL=1).
2026-11-28 08:33:18 -05:00
9dcc3e75dc ptr_truncation_census: guard output overwrites/paths, catch OSError in scan_one/listings, and write JSON atomically 2026-11-25 05:45:42 +01:00
3e6c747bd6 ptr_truncation_census: one --limit check, and the test asserts its message
#6553 rejects --limit below 1 in the argparse type (positive_int) and #6696 added a
second check after parse_args with its own message, which the new test asserts. Both
landed, so argparse exits first with "argument --limit: must be at least 1" and the
later check never runs: test_limit_must_be_positive failed on main.

Keep the type check, give it the longer reason from the removed check, and assert the
message argparse prints. Exit code stays 2.

Tested: python -I tests/test_ptr_truncation_census.py (12 tests OK); --limit 0, -1 and
abc print the argparse error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:20:35 +01:00
a5e3db9f7d ptr_truncation_census: reject --limit below 1 instead of scanning the wrong set (#6553)
Squash-merged after diff review of PR #6553
2026-11-23 12:46:27 -06:00
53bc46330a tools: reject non-positive --limit in ptr_truncation_census (#6696)
Squash-merged after diff review of PR #6696
2026-11-23 10:55:29 -06:00
eee10b8db7 ptr_truncation_census: refuse one file for --json and --index-out (the index replaced the summary) (#5905)
Squash-merged after review of PR #5905 - ptr_truncation_census: refuse one file for --json and --index-out (the index replaced the summary)
2026-11-23 08:08:06 -06:00
360e3e1de3 ptr_truncation_census: count VGPR-addressed global_* and s_getpc_b64 users
shader_meta only looks at a global_* whose base is an SGPR pair, and the corpus has none: its 10,548 global_*
instructions (530 shaders) address through VGPR pairs. The census now counts them, the s_getpc_b64 users and the
access kind of every untruncated site, and docs/d3d12_vulkan.md says that VGPR-held global_* addresses are, with
V# bases, outside what the count can see, instead of reporting "no global_* base truncated".

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 15:04:29 -07:00
1c81bbae24 docs: count the shaders that truncate a pointer's high dword (25,865 of 26,503)
tools/ptr_truncation_census.py runs rdna2spirv.translate() up to its shader_meta.collect call, writes no SPIR-V,
and records every base pair shader_meta's truncates_high / ptr32_lo rule looks at: the access (descriptor-table
load, scalar load, global_*), the low and the high half. Over package 1.0.2.1 every truncated pointer is the base
of a 4/8/16-dword descriptor load from a user SGPR (86,036 in 25,865 shaders, at most 5 per shader); no global_*
or 1-2 dword s_load base is truncated. docs/d3d12_vulkan.md replaces "some"/"many" with those counts.

Controls from the same pass: 26,503 shaders per stage as docs/design.md, user_sgpr_census.py on its index gives
section 3.5's 9,830 / 1,660 / 2,364 / 7,977, and 204 sampled shaders match a full translate's build_meta.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 15:04:28 -07:00