[PATCH] D70456: [Matrix] Add first set of matrix intrinsics and initial lowering pass.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 12:47:01 PST 2019


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/docs/LangRef.rst:14479
+column A and the beginning of column B. Given the start address of column A,
+the start address of column B is computed as A + <Rows> + %Stride.
+The result matrix is returned embedded in the result vector. This allows for
----------------
fhahn wrote:
> LuoYuanke wrote:
> > LuoYuanke wrote:
> > > LuoYuanke wrote:
> > > > Is it more straight forward that the start address of column B is computed as A + %stride? Given a 3D array "tensor[9][8][7]", to load some rows of data from the array the %stride can be 8*7*2 instead of 8*7*2-7.
> > > What I mean is the the start address of column B is computed as A + <Rows> * %Stride.
> > I mean the the start address of column B is computed as A + %Stride.
> > I mean the the start address of column B is computed as A + %Stride.
> 
> That would simplify things a bit and be more in-line with what people expect a stride to be? The only slight advantage of having stride separately might be that it is slightly easier to ensure stride >= Rows (assuming only positive strides). But we can check for that separately and require Stride >= Rows. What do you think?
I went ahead and put up a patch that uses the fact that Stride >= NumRows to emit !alias.scope and !noalias metadata to make sure we can deduce no-alias for columwise accesses sharing the same stride and base pointer (except accesses to the same column of course): D71295


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70456





More information about the llvm-commits mailing list