7 Commits

Author SHA1 Message Date
f8c32396c1 vk_gpu_profile_test: say so and skip the per-pipeline checks when a paravirtual GPU resolves no timestamp
The macOS runner's Apple Paravirtual device sometimes resolves none of the 7
timestamps (runtime run 46433144059: entries.size() == 3 failed at line 300,
before the existing guard for constant timestamps), while other runs on the
same image pass. Only on a paravirtual device and only with 0 timestamps, the
per-pipeline and interval checks are skipped and the output says so; any other
device is checked in full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 17:00:23 +01:00
eade9562c1 tests: raise kHeavyTurns in vk_gpu_profile_test and synchronize lock_timed holder in submit_frame_test 2026-11-29 16:17:10 -05:00
1d0867c4a7 runtime: zero-init TargetView trailing padding and allow clamped 0 ms graphics interval in vk_gpu_profile_test 2026-11-29 15:27:45 -05:00
eccc71b324 Fix d3d12_m4_compute_async_small_waits deadlock, vk_presenter_sync wait, and test builds 2026-11-28 16:50:03 -05:00
b2c9695962 Fix NVIDIA sparse arena, MSVC TLS callbacks, FTZ32 probe, teardown leaks, and cross-GPU tests 2026-11-28 16:34:52 -05:00
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
293fbeacad d3d12: LEONIDA_GPU_PROFILE=1 measures the GPU time of each pipeline from timestamps
A diagnostic, off by default. Each submission on a queue whose family has
timestamp bits gets a query pool, reset once at the start of its command
buffer, and bottom-of-pipe timestamps: after the opening barrier and
bindless upload, before each run of consecutive draws or dispatches of one
pipeline, after a run that another command follows, and at the end. The
difference between two consecutive timestamps is what lies between them
added to the queue's work: a run's GPU time, or "other" when no draw or
dispatch lies between. The results are read on the fence callback once the
submission is done, never waited for, and summed by pipeline under its
stages' ShaderLibrary names (as the pass trace prints them), else its id.

Every 10 s, [rt] gpu profile lines give per frame the compute, graphics
and mesh totals, other work, per queue kind the busy time (measured as
LEONIDA_GPU_LATENCY does) against the timestamped span and the share in
draws and dispatches, and the 20 pipelines with the most GPU time (ms per
frame, share, kind, calls per frame, ms per call).

PSOs register their names with the context when the profile is on, as
they already do for the device-fault report; the device passes the
families' timestamp bits to the context. Off: one test per submission and
per command. On: about 1 us per timestamp on the Raphael iGPU, submit to
idle (vk_gpu_profile_test).

vk_gpu_profile_test runs known dispatches of two pipelines and a draw
through VulkanQueue and checks each pipeline's name, calls, runs, a time
that grows with its loop count, and that the intervals add up to the span.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 18:50:22 -05:00