<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Matrix] Allow specifying the width of the accumulator for matrix multiplication"
href="https://bugs.llvm.org/show_bug.cgi?id=47764">47764</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Matrix] Allow specifying the width of the accumulator for matrix multiplication
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>florian_hahn@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>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
(<a href="http://lists.llvm.org/pipermail/cfe-dev/2020-August/066489.html">http://lists.llvm.org/pipermail/cfe-dev/2020-August/066489.html</a>) and also
raised during the Q&A of the "Matrix Support in Clang and LLVM" talk.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>