[PATCH] D79658: [mlir][Affine] Introduce affine.vload and affine.vstore

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 09:07:18 PDT 2020


dcaballe marked 2 inline comments as done.
dcaballe added a comment.

Thanks, Mehdi!

> What about `affine.vector_store` (or `affine.vec_store`)?

`affine.vector_store` sounds good to me. Anybody else?



================
Comment at: mlir/include/mlir/Dialect/Affine/IR/AffineOps.td:825
+    The "affine.vstore" is the vector counterpart of
+    [affine.store](#affinestore-affinestoreop). It performs a blocking write
+    from a [vector](../LangRef.md#vector-type), supplied as its first operand,
----------------
mehdi_amini wrote:
> Do we have another term than "blocking"? It can be ambiguous with respect "synchronous" for example, and it isn't clear to me in general.
> Is this "store a vector to a contiguous memory segment"?
> 
This doc is a copy-paste mix of `AffineStoreOp` doc and `VectorTransferWriteOp` doc, including the "blocking" terminology. I decided to do that for consistent with the vector dialect. I can replace "blocking write" by something along the lines of "store to a vector to a contiguous memory segment" in both dialects if that is clearer. We may have to revisit this doc anyways if/when we introduce strided or gather/scatter accesses.


================
Comment at: mlir/test/Conversion/AffineToStandard/lower-affine-to-vector.mlir:8
+  affine.for %i0 = 0 to 16 {
+    %1 = affine.vload %0[%i0 + symbol(%arg0) + 7] : memref<16xf32>, vector<8xf32>
+  }
----------------
mehdi_amini wrote:
> Isn't this reading out-of-bound?
It might anyways due to `arg0` being an arbitrary input but I'll make it less obvious :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79658/new/

https://reviews.llvm.org/D79658





More information about the llvm-commits mailing list