[llvm-bugs] [Bug 47764] New: [Matrix] Allow specifying the width of the accumulator for matrix multiplication

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 8 03:21:15 PDT 2020


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: unassignedclangbugs at nondot.org
          Reporter: florian_hahn at apple.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201008/0f2624c9/attachment-0001.html>


More information about the llvm-bugs mailing list