Skip to content

[mlir][vector] Update document for vector.splat(NFC) #112363

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
Oct 15, 2024
Merged

Conversation

CoTinker
Copy link
Contributor

This PR updates the document for vector.splat, specifying that the operand type must match the element type of the result.

@llvmbot
Copy link
Member

llvmbot commented Oct 15, 2024

@llvm/pr-subscribers-mlir-vector

@llvm/pr-subscribers-mlir

Author: Longsheng Mou (CoTinker)

Changes

This PR updates the document for vector.splat, specifying that the operand type must match the element type of the result.


Full diff: https://github.com/llvm/llvm-project/pull/112363.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/Vector/IR/VectorOps.td (+2-2)
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index b0de7c11b9d436..a00f4682e67d4f 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -2807,8 +2807,8 @@ def Vector_SplatOp : Vector_Op<"splat", [
     Example:
 
     ```mlir
-    %s = arith.constant 10.1 : f32
-    %t = vector.splat %s : vector<8x16xi32>
+    %s = arith.constant 1.0 : f32
+    %t = vector.splat %s : vector<8x16xf32>
     ```
   }];
 

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch!

Copy link
Contributor

@banach-space banach-space left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % one nit

This PR updates the document for `vector.splat`, specifying that the
operand type must match the element type of the result.
@CoTinker
Copy link
Contributor Author

Thanks for your review.

@CoTinker CoTinker merged commit a24e8a7 into llvm:main Oct 15, 2024
8 checks passed
@CoTinker CoTinker deleted the splat branch October 15, 2024 17:50
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
This PR updates the document for `vector.splat`, specifying that the
operand type must match the element type of the result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants