[PATCH] D80663: Change description to match code representation.

Braedy Kuzma via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 14:12:57 PDT 2020


braedy created this revision.
braedy added reviewers: anemet, LuoYuanke, nicolasvasilache, fhahn.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently all code instances within the matrix lowering pass consider
matrix A to be MxN and B to be NxK, producing C which is MxK. Anyone
interacting with this API after reading the docs but without reading the pass
would expect A: MxK, B: KxN, and C: MxN. These changes bring the documentation
in line with the implementation.

One point of concern with this, the original signature as described in the docs
may be better or at least more expected. The interface as it was written
reflected other common matrix multiplication interfaces such as BLAS'[1], where
the matrices are MxK, KxN, MxN respectively. Choosing to honor this requires
changing code and tests instead, but should be mostly just renaming of variables.

[1] http://www.netlib.org/lapack/explore-html/db/dc9/group__single__blas__level3_gafe51bacb54592ff5de056acabd83c260.html#gafe51bacb54592ff5de056acabd83c260


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80663

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -15244,16 +15244,16 @@
 Overview:
 """""""""
 
-The '``llvm.matrix.multiply.*``' intrinsic treats %A as matrix with <M> rows and <K> columns, %B as
-matrix with <K> rows and <N> columns and multiplies them. The result matrix is returned embedded in the
+The '``llvm.matrix.multiply.*``' intrinsic treats %A as matrix with <M> rows and <N> columns, %B as
+matrix with <N> rows and <K> columns and multiplies them. The result matrix is returned embedded in the
 result vector.
 
 Arguments:
 """"""""""
 
 The <M>, <N> and <K> arguments must be constant integers.  The vector argument %A
-must have <M> * <K> elements, %B must have <K> * <N> elements and the returned
-vector must have <M> * <N> elements.
+must have <M> * <N> elements, %B must have <N> * <K> elements and the returned
+vector must have <M> * <K> elements.
 
 
 '``llvm.matrix.columnwise.load.*``' Intrinsic


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80663.266667.patch
Type: text/x-patch
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200527/c143549d/attachment.bin>


More information about the llvm-commits mailing list