vk_gpu_profile_test: skip the per-pipeline checks, and say so, when a paravirtual GPU resolves no timestamp #2758

Merged
OreoFR merged 1 commit from upstream-pr/2758 into main 2026-11-30 17:15:50 +00:00
OreoFR commented 2026-11-30 16:00:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T16:00:29Z.


Claim: TEST-VK-GPU-PROFILE-PARAVIRTUAL-NO-STAMPS (#2570).

What

runtime/test/vk_gpu_profile_test.cpp only. When the device is an Apple Paravirtual GPU and it resolved no timestamp at all (queue.stamps == 0), the per-pipeline and interval checks are skipped, submissions == 1 is still checked, and the output says what was skipped:
note: <device> resolved no timestamps this run (0 of 7, N entries); skipping the per-pipeline and interval checks.
Any other device, or a paravirtual one that resolved some timestamps, is checked exactly as before (the existing "constant timestamps" guard is unchanged).

Why

The macos job of the Runtime workflow on main (f44904d21, run 46433144059) failed at line 300: entries.size() == 3, with device: Apple Paravirtual device and queue: 1 submissions, 0 timestamps, ... span 0.0000 ms. Every check after line 300 assumed the timestamps were resolved; the guard at lines 310-318 covers only a paravirtual GPU that resolves them with constant values. be7690805 passes the test on the same kind of runner (MoonEyes), so it is intermittent there. The macos job does not run on pull requests, so the test had not met that runner before it was merged.

Tests

  • MEASURED, macOS 27.2.1, Apple M5 (a real GPU), MoltenVK from Homebrew, main ca191f633: ctest -R ^vk_gpu_profile: Passed, full checks (7 timestamps, span 11.80 ms, no note), the same as main.
  • MEASURED, the new branch forced on once (condition set to true locally, not committed): the note is printed and the test passes; then the real condition was restored and rebuilt.
  • Not run on the paravirtual runner itself (the macos job runs on pushes to main, not on this pull request).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5568852486 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2758). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T16:00:29Z. --- Claim: TEST-VK-GPU-PROFILE-PARAVIRTUAL-NO-STAMPS (#2570). ## What `runtime/test/vk_gpu_profile_test.cpp` only. When the device is an Apple Paravirtual GPU **and** it resolved no timestamp at all (`queue.stamps == 0`), the per-pipeline and interval checks are skipped, `submissions == 1` is still checked, and the output says what was skipped: `note: <device> resolved no timestamps this run (0 of 7, N entries); skipping the per-pipeline and interval checks`. Any other device, or a paravirtual one that resolved some timestamps, is checked exactly as before (the existing "constant timestamps" guard is unchanged). ## Why The `macos` job of the Runtime workflow on `main` (`f44904d21`, run 46433144059) failed at `line 300: entries.size() == 3`, with `device: Apple Paravirtual device` and `queue: 1 submissions, 0 timestamps, ... span 0.0000 ms`. Every check after line 300 assumed the timestamps were resolved; the guard at lines 310-318 covers only a paravirtual GPU that resolves them with constant values. `be7690805` passes the test on the same kind of runner (MoonEyes), so it is intermittent there. The `macos` job does not run on pull requests, so the test had not met that runner before it was merged. ## Tests - MEASURED, macOS 27.2.1, Apple M5 (a real GPU), MoltenVK from Homebrew, `main` `ca191f633`: `ctest -R ^vk_gpu_profile`: **Passed**, full checks (`7 timestamps, span 11.80 ms`, no note), the same as `main`. - MEASURED, the new branch forced on once (condition set to `true` locally, not committed): the note is printed and the test passes; then the real condition was restored and rebuilt. - Not run on the paravirtual runner itself (the `macos` job runs on pushes to `main`, not on this pull request). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-11-30 16:19:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T16:19:07Z.


Independent Vulkan check of the missing-timestamp branch

MEASURED. I tested f8c32396 merged onto main a21a62af (tree e3b8e8f5). I ran the full synthetic Vulkan workload in vk_gpu_profile_test on the Radeon 610M (RADV 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04), using native Linux drivers on CachyOS with Khronos validation. The test-only shim feeds the first vkGetQueryPoolResults call either VK_NOT_READY or seven identical ticks. For the paravirtual cases it changes the displayed name to Apple Paravirtual device. The profiler processes those results through normal submission retirement.

First submission Profiler output main This PR
Real results and real device name 1 submission, 7 timestamps, 3 entries Pass Pass
VK_NOT_READY, real device name 1 submission, 0 timestamps, 0 entries, 1 unread Fails at entry-count check Fails at entry-count check
VK_NOT_READY, synthetic paravirtual name Same missing-timestamp counts Fails at entry-count check Pass, explicit skip note
Seven equal ticks, synthetic paravirtual name 1 submission, 7 timestamps, 3 entries, zero span Pass, existing constant-timestamp note Pass, existing constant-timestamp note

The matrix matched on both GPUs. All 10 successful runs reported zero validation errors. The six expected failures reached the entry-count assertion. A second agent independently checked the raw logs and exit codes. This verifies the name-based test branch for injected query results on Linux. The Apple VM timing behavior was simulated. Synthetic inputs only. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284470683 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2758#issuecomment-7284470683). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-30T16:19:07Z. --- # Independent Vulkan check of the missing-timestamp branch **MEASURED.** I tested `f8c32396` merged onto `main` `a21a62af` (tree `e3b8e8f5`). I ran the full synthetic Vulkan workload in `vk_gpu_profile_test` on the Radeon 610M (RADV 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04), using native Linux drivers on CachyOS with Khronos validation. The test-only shim feeds the first `vkGetQueryPoolResults` call either `VK_NOT_READY` or seven identical ticks. For the paravirtual cases it changes the displayed name to `Apple Paravirtual device`. The profiler processes those results through normal submission retirement. | First submission | Profiler output | `main` | This PR | | --- | --- | --- | --- | | Real results and real device name | 1 submission, 7 timestamps, 3 entries | Pass | Pass | | `VK_NOT_READY`, real device name | 1 submission, 0 timestamps, 0 entries, 1 unread | Fails at entry-count check | Fails at entry-count check | | `VK_NOT_READY`, synthetic paravirtual name | Same missing-timestamp counts | Fails at entry-count check | Pass, explicit skip note | | Seven equal ticks, synthetic paravirtual name | 1 submission, 7 timestamps, 3 entries, zero span | Pass, existing constant-timestamp note | Pass, existing constant-timestamp note | The matrix matched on both GPUs. All 10 successful runs reported zero validation errors. The six expected failures reached the entry-count assertion. A second agent independently checked the raw logs and exit codes. This verifies the name-based test branch for injected query results on Linux. The Apple VM timing behavior was simulated. Synthetic inputs only. AI-assisted with OpenAI Codex.
KelboLive commented 2026-11-30 16:31:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:31:31Z.


Independent check on Windows/NVIDIA (not the author), at f8c32396c.

  • Built vk_gpu_profile_test; compiled its inputs with glslc (gpu_profile_spin.comp/.vert).
  • Ran on the RTX 4070 Ti SUPER: exit 0, vk_gpu_profile_test: OK; timestamps 64-bit, 1 ns/tick; cs light/cs heavy/vs spin_vertices all reported, backward-timestamp clamp unit check OK.
  • This device is not paravirtual, so the new "no timestamp → skip per-pipeline" path is not exercised here; the normal per-pipeline path is.

Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Vulkan SDK 1.4.363.0, Windows 11 Pro 10.0.26200.9711.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284808446 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2758#issuecomment-7284808446). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:31:31Z. --- Independent check on Windows/NVIDIA (not the author), at `f8c32396c`. - Built `vk_gpu_profile_test`; compiled its inputs with `glslc` (`gpu_profile_spin.comp`/`.vert`). - Ran on the RTX 4070 Ti SUPER: **exit 0**, `vk_gpu_profile_test: OK`; timestamps 64-bit, 1 ns/tick; `cs light`/`cs heavy`/`vs spin_vertices` all reported, backward-timestamp clamp unit check OK. - This device is not paravirtual, so the new "no timestamp → skip per-pipeline" path is not exercised here; the normal per-pipeline path is. Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Vulkan SDK 1.4.363.0, Windows 11 Pro 10.0.26200.9711. AI-assisted: yes (opencode).
MoonEyes commented 2026-11-30 17:15:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T17:15:46Z.


Merging. Head f8c32396c merges cleanly with main efe695aa9 and does not force a rebase of #2566. Test only, checked by merzleckeier on two GPUs (head f8c32396). Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7285982083 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2758#issuecomment-7285982083). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T17:15:46Z. --- Merging. Head `f8c32396c` merges cleanly with `main` `efe695aa9` and does not force a rebase of #2566. Test only, checked by merzleckeier on two GPUs (head f8c32396). Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2758
No description provided.