[Mlir-commits] [mlir] [mlir][vector] Add tests for scalable vectors in bufferize-invalid.mlir (PR #102361)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 7 13:14:01 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-vector
@llvm/pr-subscribers-mlir
Author: Andrzej WarzyĆski (banach-space)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/102361.diff
1 Files Affected:
- (modified) mlir/test/Dialect/Vector/bufferize-invalid.mlir (+9)
``````````diff
diff --git a/mlir/test/Dialect/Vector/bufferize-invalid.mlir b/mlir/test/Dialect/Vector/bufferize-invalid.mlir
index bcca50a0fe79a..12ee0d5728170 100644
--- a/mlir/test/Dialect/Vector/bufferize-invalid.mlir
+++ b/mlir/test/Dialect/Vector/bufferize-invalid.mlir
@@ -6,3 +6,12 @@ func.func @mask(%t0: tensor<?xf32>, %val: vector<16xf32>, %idx: index, %m0: vect
%0 = vector.mask %m0 { vector.transfer_write %val, %t0[%idx] : vector<16xf32>, tensor<?xf32> } : vector<16xi1> -> tensor<?xf32>
return %0 : tensor<?xf32>
}
+
+// -----
+
+// CHECK-LABEL: func @mask_scalable(
+func.func @mask_scalable(%t0: tensor<?xf32>, %val: vector<[16]xf32>, %idx: index, %m0: vector<[16]xi1>) -> tensor<?xf32> {
+ // expected-error @+1 {{'vector.mask' op body must bufferize in-place}}
+ %0 = vector.mask %m0 { vector.transfer_write %val, %t0[%idx] : vector<[16]xf32>, tensor<?xf32> } : vector<[16]xi1> -> tensor<?xf32>
+ return %0 : tensor<?xf32>
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/102361
More information about the Mlir-commits
mailing list