https://bugs.llvm.org/show_bug.cgi?id=47764
Bug ID: 47764
Summary: [Matrix] Allow specifying the width of the accumulator
for matrix multiplication
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Sometimes it is desirable to perform matrix multiplications where the results
are accumulated in a wider type than the inputs, for example because this
allows to use of specialized instructions, e.g. AArch64's udot instruction.
We would need a way to express this using the C/C++ extension and for
@llvm.matrix.multiply.
We could allow different element types for the return type of
@llvm.matrix.multiply and have the width of the result type indicate the width
of the accumulator to be used. If users want to truncate/extend the result of
the multiplication, this can be done using zext/trunc already.
On the C/C++ side, I am not sure we can get away with this, because the
extension allows conversions between matrixes with different element types, so
we probably would need a way to specify the accumulator width explicitly,
perhaps using a specialized multiply builtin.
This was discussed on cfe-dev
(http://lists.llvm.org/pipermail/cfe-dev/2020-August/066489.html) and also
raised during the Q&A of the "Matrix Support in Clang and LLVM" talk.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs