[Mlir-commits] [mlir] [mlir][vector][spirv] Lower vector.load and vector.store to SPIR-V (PR #71674)

Kai Wang llvmlistbot at llvm.org
Thu Nov 9 05:37:47 PST 2023


================
@@ -631,3 +631,105 @@ func.func @shape_cast_size1_vector(%arg0 : vector<f32>) -> vector<1xf32> {
   %1 = vector.shape_cast %arg0 : vector<f32> to vector<1xf32>
   return %1 : vector<1xf32>
 }
+
+// -----
+
+module attributes {
+  spirv.target_env = #spirv.target_env<
+    #spirv.vce<v1.0, [Shader], [SPV_KHR_storage_buffer_storage_class]>, #spirv.resource_limits<>>
----------------
Hsiangkai wrote:

Yes, I intend to use these patterns for graphics APIs. I tried to change it to `[Kernel]`. However, I got the legalization issue after conversion.
```
spirv.AccessChain illegal: requires at least one capability in [Shader] but none allowed in target environment
```


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


More information about the Mlir-commits mailing list