From 524cf28137ec10a149cf574815713ec38d93ed89 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 23:57:27 -0800 Subject: [PATCH] RUNTIME_VERSION 1954 and the runtime-sources pin for held groups that never wait behind another queue's handler The eleven commits before this are sweep's fix for a scheduler hang under CompletionPolicy::Grouped (the default): - The bug: a group held behind running work waited while a submission handler of another logical queue, which waited for a command buffer in that group, ran on the scheduler thread. A probe on the M3 Max shows Metal delivers across queues (30/30) and never within one queue (10/10). - The fix: scheduler::holds_back_another_queue sends the held group before such a handler runs. - DeviceOptions::assume_submissions_merge (doc-hidden, a test hook like fail_in_place_check) holds the device's merge check, so the handler test checks the held group on every run. - Under Exact (the lane devices') no group is held, so the Iris deallocator lane red is a separate, open cause. - Two intermediate commits (from 2a43201e53 and d7065a11b5) do not compile alone; a bisect skips them. Scheduling changes, which a stored runtime artifact can see. So RUNTIME_VERSION goes 1953 -> 1954 and the runtime-sources pin is recomputed: 6bdfea21e45d0dbc47b4f86037e1ebeeefd23302ac877f0d5a9c1748b0667567. Verified by sweep at bf62810259 (same content on an older base): - XTX 11130: handler test 3/3 (X and Y in one submission, Y reached in ~440 ms); without the fix, Y waits 60 s and the test fails; deallocator 10/10; plain and gpu clippy clean; api tables 11/11. - lavapipe: handler 2/2, deallocator 5/5. - 780M 11096: grouped, reached in 330/428 ms; without the fix, 60 s. - M3 MoltenVK 11134: handler 3/3, deallocator 10/10 (MoltenVK never groups). - Cost, 780M frame_costs_over_imports: identical before and after. Still running: the tip on the development base (11155), the 780M (11148) and Iris (11131/11132). The cherry-picks onto c79a468965 were clean; this tree is not yet built. api-signatures --check, refusal-surface and conformance-coverage leave the docs unchanged. --- crates/metal2vulkan-validation/runtime-sources.sha256 | 2 +- crates/metal2vulkan/src/cache/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index d2db1e458..a01ac5b04 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -024636ce2d7c319e5f480b2bc34f665b46092ab83cd58d2ea877342402f97892 +6bdfea21e45d0dbc47b4f86037e1ebeeefd23302ac877f0d5a9c1748b0667567 diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 99bbaef89..4a01e4410 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 496; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 1953; +pub const RUNTIME_VERSION: u32 = 1954; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles