Skip to content

[mlir][vector][NFC] Add deprecation notice to splat's .td #149532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,8 @@ def Vector_SplatOp : Vector_Op<"splat", [
]> {
let summary = "vector splat or broadcast operation";
let description = [{
Note: This operation is deprecated. Please use vector.broadcast.

Broadcast the operand to all elements of the result vector. The type of the
operand must match the element type of the vector type.

Expand All @@ -2928,6 +2930,13 @@ def Vector_SplatOp : Vector_Op<"splat", [
%s = arith.constant 10.1 : f32
%t = vector.splat %s : vector<8x16xf32>
```

This operation is deprecated, the preferred representation of the above is:

```mlir
%s = arith.constant 10.1 : f32
%t = vector.broadcast %s : f32 to vector<8x16xf32>
```
}];

let arguments = (ins AnyType:$input);
Expand Down
Loading