From e22ca6d46acf805dddd769110f7c745b933cd1d9 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 16 Nov 2026 16:26:28 -0800 Subject: [PATCH] Runtime lane: alone_batches and joined_completions' two-queue test take their queue plan Both tests failed on the RTX 5080 Laptop GPU's validation leg (596d917dfe round) at layer_claim.rs:293 with the runtime's `metal2vulkan-queue-limits-reached`: "the program's command queue 2 on a round robin of 1 VkQueue(s), took VkQueue 0, which another took, where the plan's 14 give it one of its own". The lane makes its devices under `LANE_QUEUE_LIMITS` (one round-robin VkQueue). Its documented rule (runtime_lane.rs, `LANE_QUEUE_LIMITS`) is that this notice fails the run, and that a test whose work places a second command queue, or an unshared one, makes its device with its plan through its own adjust (`at_plan`). Neither test did: - `alone_batches::a_batch_that_goes_alone_is_counted_once_by_why` (3a0e4b35a2, 25c7f896f9) uses `first`, `queue` and an unshared queue. - `joined_completions::an_unmarked_command_buffer_is_seen_complete_at_its_own_end` (c9bad0206e) uses `queue` and `aside`. Only a device whose families have queues to spare (NVIDIA's 16) is affected, because elsewhere the limits leave the plan as it is. Neither test had run on NVIDIA before this round. The fix is the existing rule, one rule for both: each test's adjust calls `at_plan`. Our notice stays a failure in the lane, as the lane's queue-limit contract says. Verified: the 5080 run of this commit (named in the tip report). --- .../src/runtime_lane/alone_batches.rs | 5 ++++- .../src/runtime_lane/joined_completions.rs | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/src/runtime_lane/alone_batches.rs b/crates/metal2vulkan-validation/src/runtime_lane/alone_batches.rs index 9a0ee1d88..84f45a2a3 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/alone_batches.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/alone_batches.rs @@ -31,7 +31,7 @@ //! after the next command buffer the GPU ran ended. use super::grouped_submissions::{groups, host_seconds, taken_in, warm}; -use super::{layer_reported_nothing_at_all, loader, open_device, validated_device_with}; +use super::{at_plan, layer_reported_nothing_at_all, loader, open_device, validated_device_with}; use super::{Messages, ScratchCache, WAIT}; use crate::gpu::TEST_DEVICE; use metal2vulkan::device::CompletionPolicy; @@ -193,8 +193,11 @@ fn a_batch_that_goes_alone_is_counted_once_by_why() { { // The lane's devices take `DevicePolicy::exact_answers()`, `CompletionPolicy::Exact` // among them, under which nothing groups and no reason is counted: this one the default. + // Its work places command queues beside each other, an unshared one among them: it takes + // its queue plan (`at_plan`). let device = validated_device_with(TEST_DEVICE, &messages, cache.path(), |options| { options.policy.completion = CompletionPolicy::Grouped; + at_plan(options); }) .unwrap(); let grouping = groups(&device); diff --git a/crates/metal2vulkan-validation/src/runtime_lane/joined_completions.rs b/crates/metal2vulkan-validation/src/runtime_lane/joined_completions.rs index 4a048af4b..6a8e8d9dc 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/joined_completions.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/joined_completions.rs @@ -23,7 +23,9 @@ use super::degrade_notices::counts; use super::grouped_submissions::{bytes_of, groups, taken_in, warm, GROUPED}; -use super::{layer_reported_nothing_at_all, validated_device_with, Messages, ScratchCache, WAIT}; +use super::{ + at_plan, layer_reported_nothing_at_all, validated_device_with, Messages, ScratchCache, WAIT, +}; use crate::gpu::TEST_DEVICE; use metal2vulkan_runtime::{ Buffer, CommandBuffer, CommandBufferStatus, EventRef, ResourceOptions, WorkCounts, @@ -217,8 +219,10 @@ fn an_unmarked_command_buffer_is_seen_complete_at_its_own_end() { let messages = Messages::default(); let cache = ScratchCache::new().unwrap(); let (moved, seen) = { + // Its work places a second command queue (`aside`): it takes its queue plan (`at_plan`). let device = validated_device_with(TEST_DEVICE, &messages, cache.path(), |options| { options.assume_submissions_merge = true; + at_plan(options); }) .unwrap(); let grouping = groups(&device);