[mlir][gpu] Relax restriction on MMA store op to allow chain of mma ops.
authorthomasraoux <thomasraoux@google.com>
Thu, 27 May 2021 15:58:11 +0000 (08:58 -0700)
committerthomasraoux <thomasraoux@google.com>
Thu, 27 May 2021 16:13:51 +0000 (09:13 -0700)
commitb44007bec2470db0d9f100c6a9216d8e05cef608
tree0522516af3f06cf0a93906acf22eb7a096d9b309
parent6d2c0950205f50f926ba5e362e845faff22582b7
[mlir][gpu] Relax restriction on MMA store op to allow chain of mma ops.

In order to allow large matmul operations using the MMA ops we need to chain
operations this is not possible unless "DOp" and "COp" type have matching
layout so remove the "DOp" layout and force accumulator and result type to
match.
Added a test for the case where the MMA value is accumulated.

Differential Revision: https://reviews.llvm.org/D103023
mlir/include/mlir/Dialect/GPU/GPUDialect.h
mlir/include/mlir/Dialect/GPU/GPUOps.td
mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/test/Conversion/GPUToNVVM/wmma-ops-to-nvvm.mlir
mlir/test/Dialect/GPU/invalid.mlir
mlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f16.mlir
mlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f32.mlir