From e6f2606842a3bc5e432be670a3b78c27bd2c183f Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 27 Nov 2026 03:17:43 -0800 Subject: [PATCH] Translator tests: the OpenCL-mode barrier refusal test compiles under the runtime's policy Its control (the same AIR without the mode orders texture memory) built the 780M's device under the resident-table domains, where the lockstep pass inserts two barriers of its own after the program's, so the module held three barriers where the test asked for one (job m3-max-76626 on the commit before). The runtime compiles under DevicePolicy::default(), whose identity domains order no lockstep pair, as the other new test already does; the refusal test now takes the 780M's profile from the same devices. At the commit before, job m3-max-76628 ran both new tests with that commit's sources in canon and intrinsics reverted to its parent: the flags test fails, CLK_LOCAL_MEM_FENCE lowering to UniformMemory (64) and CLK_GLOBAL_MEM_FENCE to WorkgroupMemory (256) on the 780M HawkPoint profile, and the refusal test fails as the flags-4 barrier compiles. With them (job m3-max-76626) the flags test passes on every committed profile under the runtime's policy. --- crates/metal2vulkan/src/tests/engine_opencl_mode.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan/src/tests/engine_opencl_mode.rs b/crates/metal2vulkan/src/tests/engine_opencl_mode.rs index adca1d0d1..dab7228ee 100644 --- a/crates/metal2vulkan/src/tests/engine_opencl_mode.rs +++ b/crates/metal2vulkan/src/tests/engine_opencl_mode.rs @@ -970,11 +970,13 @@ fn an_opencl_mode_barrier_orders_the_memory_its_opencl_flags_name() { /// In OpenCL mode a barrier whose flags set a bit `cl_mem_fence_flags` does not name (4, which /// Metal's `mem_flags` read as `mem_texture`) is refused as an intrinsic outside the modeled set, /// as a constant and through the wrapper; without the mode the same AIR orders texture memory -/// (`ImageMemory`). +/// (`ImageMemory`), on the 780M's profile under the runtime's policy. #[test] fn an_opencl_mode_barrier_of_a_flag_opencl_does_not_name_is_refused() { let b = Budget::standard(); - let dev = device("amd-780m-radv"); + let (_, dev) = (runtime_devices().into_iter()) + .find(|(stem, _)| stem == "amd-780m-radv") + .expect("the 780M's profile"); let routes = [ ( "inline",