Skip to content

Commit 30705c5

Browse files
authored
[mlir][vector][NFC] Add deprecation notice to splat's .td (#149532)
Part of deprecation of vector.splat RFC: https://discourse.llvm.org/t/rfc-mlir-vector-deprecate-then-remove-vector-splat/87143/4
1 parent 2343388 commit 30705c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,6 +2850,8 @@ def Vector_SplatOp : Vector_Op<"splat", [
28502850
]> {
28512851
let summary = "vector splat or broadcast operation";
28522852
let description = [{
2853+
Note: This operation is deprecated. Please use vector.broadcast.
2854+
28532855
Broadcast the operand to all elements of the result vector. The type of the
28542856
operand must match the element type of the vector type.
28552857

@@ -2859,6 +2861,13 @@ def Vector_SplatOp : Vector_Op<"splat", [
28592861
%s = arith.constant 10.1 : f32
28602862
%t = vector.splat %s : vector<8x16xf32>
28612863
```
2864+
2865+
This operation is deprecated, the preferred representation of the above is:
2866+
2867+
```mlir
2868+
%s = arith.constant 10.1 : f32
2869+
%t = vector.broadcast %s : f32 to vector<8x16xf32>
2870+
```
28622871
}];
28632872

28642873
let arguments = (ins AnyType:$input);

0 commit comments

Comments
 (0)