1// RUN: mlir-opt -allow-unregistered-dialect -convert-gpu-to-spirv -verify-diagnostics %s -o - | FileCheck %s 2 3module attributes { 4 gpu.container_module, 5 spv.target_env = #spv.target_env<#spv.vce<v1.0, [Kernel, Addresses], []>, {}> 6} { 7 gpu.module @kernels { 8 // CHECK-LABEL: spv.module @{{.*}} Physical64 OpenCL 9 // CHECK: spv.func 10 // CHECK-SAME: {{%.*}}: f32 11 // CHECK-NOT: spv.interface_var_abi 12 // CHECK-SAME: {{%.*}}: !spv.ptr<!spv.struct<(!spv.array<12 x f32, stride=4> [0])>, CrossWorkgroup> 13 // CHECK-NOT: spv.interface_var_abi 14 // CHECK-SAME: spv.entry_point_abi = {local_size = dense<[32, 4, 1]> : vector<3xi32>} 15 gpu.func @basic_module_structure(%arg0 : f32, %arg1 : memref<12xf32, 11>) kernel 16 attributes {spv.entry_point_abi = {local_size = dense<[32, 4, 1]>: vector<3xi32>}} { 17 gpu.return 18 } 19 } 20 21 func @main() { 22 %0 = "op"() : () -> (f32) 23 %1 = "op"() : () -> (memref<12xf32, 11>) 24 %cst = constant 1 : index 25 gpu.launch_func @kernels::@basic_module_structure 26 blocks in (%cst, %cst, %cst) threads in (%cst, %cst, %cst) 27 args(%0 : f32, %1 : memref<12xf32, 11>) 28 return 29 } 30} 31