-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir][vector][nfc] Update vector load/store doc wrt unit strides. #109267
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
Conversation
Follow up to llvm#108998. Non-contigious strides are allowed for 1-slement vector load/stores.
@llvm/pr-subscribers-mlir-vector @llvm/pr-subscribers-mlir Author: Ivan Butygin (Hardcode84) ChangesFollow up to #108998. Non-contiguous strides are allowed now for 1-element vector load/stores. Full diff: https://github.com/llvm/llvm-project/pull/109267.diff 1 Files Affected:
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index b96f5c2651bce5..65ed9b9d3df927 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -1655,6 +1655,7 @@ def Vector_LoadOp : Vector_Op<"load"> {
strides. Only unit strides are allowed along the most minor memref
dimension. These constraints guarantee that elements read along the first
dimension of the slice are contiguous in memory.
+ Non-unit strides are allowed when doing 0-rank or 1-element vector load.
The memref element type can be a scalar or a vector type. If the memref
element type is a scalar, it should match the element type of the result
@@ -1739,6 +1740,7 @@ def Vector_StoreOp : Vector_Op<"store"> {
strided by the memref strides. Only unit strides are allowed along the most
minor memref dimension. These constraints guarantee that elements written
along the first dimension of the slice are contiguous in memory.
+ Non-unit strides are allowed when doing 0-rank or 1-element vector store.
The memref element type can be a scalar or a vector type. If the memref
element type is a scalar, it should match the element type of the value
|
strides. Only unit strides are allowed along the most minor memref | ||
dimension. These constraints guarantee that elements read along the first | ||
dimension of the slice are contiguous in memory. | ||
Non-unit strides are allowed when doing 0-rank or 1-element vector load. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
strides. Only unit strides are allowed along the most minor memref | |
dimension. These constraints guarantee that elements read along the first | |
dimension of the slice are contiguous in memory. | |
Non-unit strides are allowed when doing 0-rank or 1-element vector load. | |
strides. When loading more than 1 element, only unit strides are allowed along the most minor memref | |
dimension. These constraints guarantee that elements read along the first | |
dimension of the slice are contiguous in memory. |
Rather than adding a sentence at the end (and splitting one condition across multiple sentences), why not just refine the current wording? Hope I'm not splitting hairs here 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's better, probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…lvm#109267) Follow up to llvm#108998. Non-contiguous strides are allowed now for 1-element vector load/stores.
Follow up to #108998.
Non-contiguous strides are allowed now for 1-element vector load/stores.