[Mlir-commits] [mlir] [mlir][spirv] Add support for VectorAnyINTEL capability (PR #68034)

Jakub Kuderski llvmlistbot at llvm.org
Sun Oct 22 11:44:36 PDT 2023


================
@@ -637,3 +637,22 @@ gpu.module @kernels {
 }
 
 }
+
+// -----
+
+module attributes {
+  gpu.container_module,
+  spirv.target_env = #spirv.target_env<#spirv.vce<v1.3, [Kernel, Addresses, Groups, GroupNonUniformArithmetic, GroupUniformArithmeticKHR], []>, #spirv.resource_limits<>>
+} {
+
+gpu.module @kernels {
+  // CHECK-NOT:  spirv.func @test_unsupported
+  gpu.func @test_unsupported(%arg : i32) kernel
+    attributes {spirv.entry_point_abi = #spirv.entry_point_abi<workgroup_size = [16, 1, 1]>} {
+    // expected-error @+1 {{failed to legalize operation 'gpu.subgroup_reduce'}}
+    %reduced = gpu.subgroup_reduce max %arg : (i32) -> (i32)
+    gpu.return
+  }
+}
+
+}
----------------
kuhar wrote:

nit: missing newline

https://github.com/llvm/llvm-project/pull/68034


More information about the Mlir-commits mailing list