<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">> Recent NVIDIA GPUs do support some matrix operations natively in the hardware<div><br></div><div>The inputs to the operations in question are actually defined as opaque. You have to load the inputs using a special instruction, the semantics of which are no precisely specified. This instruction loads the matrix's values distributed across the threads in a warp, and you are not allowed to assume anything about which values are where. In fact they claim that the arrangement of values is architecture-dependent.</div><div><br></div><div><a href="https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-fragment">https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-fragment</a><br></div><div><br></div><div>I suppose one might be able to spec the corresponding LLVM intrinsics for loading data in preparation for a matmul as taking a matrix pointer rather than a plain float*, but since as soon as you load it you no longer have a matrix in hand (each thread has some undefined subset of the matrix's elements), I'm not seeing any real use there other than a sort of handwavy "type-safety" argument.</div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 11:02 AM David Greene via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">JF Bastien via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> Agreed these patches would be neat to revive. <br>
<br>
We've been trying but haven't got responses to Phab comments we've<br>
posted.<br>
<br>
> I think we’d also want someone to pursue wg21.link/n4150.<br>
<br>
Definitely!<br>
<br>
> However, none of that seems like it should gate matrix support in the<br>
> IR.<br>
<br>
Agreed. But we should at least be aware of alternatives so we have a<br>
good sense of the pros/cons of the proposal.<br>
<br>
-David<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>