[mlir][py] Enable loading only specified dialects during creation. (#121421)
[llvm-project.git] / mlir / test / Target / SPIRV / barrier-ops.mlir
blob56b0661c6105b258dd7b7606e4e51e5717b5a686
1 // RUN: mlir-translate -no-implicit-module -test-spirv-roundtrip %s | FileCheck %s
3 spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
4   spirv.func @memory_barrier_0() -> () "None" {
5     // CHECK: spirv.MemoryBarrier <Device>, <Release|UniformMemory>
6     spirv.MemoryBarrier <Device>, <Release|UniformMemory>
7     spirv.Return
8   }
9   spirv.func @memory_barrier_1() -> () "None" {
10     // CHECK: spirv.MemoryBarrier <Subgroup>, <AcquireRelease|SubgroupMemory>
11     spirv.MemoryBarrier <Subgroup>, <AcquireRelease|SubgroupMemory>
12     spirv.Return
13   }
14   spirv.func @control_barrier_0() -> () "None" {
15     // CHECK: spirv.ControlBarrier <Device>, <Workgroup>, <Release|UniformMemory>
16     spirv.ControlBarrier <Device>, <Workgroup>, <Release|UniformMemory>
17     spirv.Return
18   }
19   spirv.func @control_barrier_1() -> () "None" {
20     // CHECK: spirv.ControlBarrier <Workgroup>, <Invocation>, <AcquireRelease|UniformMemory>
21     spirv.ControlBarrier <Workgroup>, <Invocation>, <AcquireRelease|UniformMemory>
22     spirv.Return
23   }