Enables transposed gpu.subgroup_mma_load_matrix and updates the lowerings in Vector to GPU and GPU to SPIRV. Needed to enable B transpose matmuls lowering to wmma ops.
Taken over from author: stanley-nod <stanley@nod-labs.com>
Paths
| Differential D138770
[mlir][gpu] Adding support for transposed mma_load_matrix ClosedPublic Authored by qedawkins on Nov 27 2022, 3:50 PM.
Details Summary Enables transposed gpu.subgroup_mma_load_matrix and updates the lowerings in Vector to GPU and GPU to SPIRV. Needed to enable B transpose matmuls lowering to wmma ops. Taken over from author: stanley-nod <stanley@nod-labs.com>
Diff Detail
Event TimelineComment Actions You also need to change the lowering to llvm otherwise the transpose attribute is just ignored which would cause a miscompile. You don’t need to implement the full lowering (I wouldn’t at least not on this patch) but you need to at least fail the lowering pattern.
Comment Actions Switch to OptionalAttr<UnitAttr> and update tests accordingly. Additionally changes the check for a transposed vector.transfer_read to directly check for a 2d transpose. Herald added subscribers: mattd, gchakrabarti, jholewinski. · View Herald TranscriptNov 28 2022, 11:23 AM
This revision is now accepted and ready to land.Nov 28 2022, 1:36 PM qedawkins marked an inline comment as done. Closed by commit rGc0321edc26a7: [mlir][gpu] Adding support for transposed mma_load_matrix (authored by qedawkins, committed by ThomasRaoux). · Explain WhyNov 28 2022, 7:36 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 478441 mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
mlir/test/Conversion/VectorToGPU/vector-to-mma-ops.mlir
|
Use OptionalAttr<UnitAttr> type instead. This will make the syntax and code simpler