[PATCH] D83477: [Matrix] Tighten LangRef definitions and Verifier checks.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 09:23:05 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/docs/LangRef.rst:15500
 or the memory layout) can be expressed using the matrix intrinsics. Matrixes are
-embedded in a flat vector and the intrinsics take the dimensions as arguments.
+linearized in a vector and the intrinsics take the dimensions as arguments.
 Currently column-major layout is assumed. The intrinsics support both integer
----------------
SjoerdMeijer wrote:
> fhahn wrote:
> > When I read linearized here, I thing about https://en.wikipedia.org/wiki/Linearization , so there might be potential for confusion.
> > 
> > It might be worth defining exactly what we mean be embedding here, then further uses should be un-ambigous: the columns of a matrix R x C are embedded into a vector such that the elements of subsequent columns are adjacent in the vector. Or more formally  element `I` of column `J` is at index `J * R + I` in the vector (with indices starting at 0)
> Yep, thanks. I was looking how to rephrase "embedded", but agree that "linearization" is perhaps equally vague, so yes this is the best we can do:
> 
> > Or more formally element I of column J is at index J * R + I in the vector (with indices starting at 0)
> 
> Will go for that one.
It would also be good to say that layout defaults to column major currently. It can be changed globally during the lowering to row-major as well, but we probably do not want to mention actual pass specifics here.


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

https://reviews.llvm.org/D83477





More information about the llvm-commits mailing list