This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Add GPU subgroup MMA to spirv.MMAMatrixTimesScalar
ClosedPublic

Authored by antiagainst on Dec 4 2022, 1:50 PM.

Details

Summary

Along the way, make the default pattern fail instead of crashing
when an elementwise op is not supported yet.

Diff Detail

Event Timeline

antiagainst created this revision.Dec 4 2022, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2022, 1:50 PM
antiagainst requested review of this revision.Dec 4 2022, 1:50 PM
kuhar accepted this revision.Dec 5 2022, 1:46 PM

Just some nits

mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp
31

nit: s/element wise/elementwise/ for consistency

32

nit: createElementwiseOp to much the capitalization of SubgroupMmaElementwiseOp and other names in mlir?

207–208

Maybe move this above the previous check? I'd assume that it's more useful to know that the number of operands is off.

214

nit: can you split this into two separate definitions?

231

nit: flip the if condition and use early return? IE auto cc = splat.get...; if (!cc) return failure()

This revision is now accepted and ready to land.Dec 5 2022, 1:46 PM
antiagainst marked 5 inline comments as done.

Address comments

This revision was landed with ongoing or failed builds.Dec 5 2022, 2:30 PM
This revision was automatically updated to reflect the committed changes.