This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Add conversion from GPU WMMA ops to SPIRV Cooperative matrix

Authored by nirvedhmeshram on Oct 21 2022, 9:07 PM.


  • Implements GPU WMMA ops to SPIRV Cooperative matrix conversion
  • Relaxes the memory requirements on Memref's used in GPU MMA ops as SPIRV has different address mappings.
  • Allows SPIRV unary arithmetic ops to also take cooperative matrix type as the SPIRV Cooperative matrix spec allows for negate ops which is unary.
  • Extends the elementwise op types supported by SubgroupMmaElementwiseOp to allow the ops supported by the SPIRV Cooperative matrix spec.

Diff Detail

Event Timeline

nirvedhmeshram created this revision.Oct 21 2022, 9:07 PM
Herald added a project: Restricted Project. · View Herald Transcript
nirvedhmeshram requested review of this revision.Oct 21 2022, 9:07 PM

Nice :) added one minor comment


nit: fix formatting


The stride should come from the gpu op leading dimension attribute.

nirvedhmeshram marked 2 inline comments as done.
ThomasRaoux accepted this revision.Oct 22 2022, 8:13 AM

LGTM, just one style related comment

This revision is now accepted and ready to land.Oct 22 2022, 8:13 AM