[mlir][gpu][spirv] Verify elementwise op type as mulf when converting to spirv.Matrix...
authorQuinn Dawkins <quinn@nod-labs.com>
Thu, 15 Dec 2022 03:04:27 +0000 (03:04 +0000)
committerThomas Raoux <thomasraoux@google.com>
Thu, 15 Dec 2022 03:15:04 +0000 (03:15 +0000)
commitb05b8970d8b35e0ffcdab1a77e8be836c0aaae70
tree97b7020197ae71bf61072169f7ba8637f59c6ee6
parent738bfbce09e700124dbcea55b2cfe7f499250b9c
[mlir][gpu][spirv] Verify elementwise op type as mulf when converting to spirv.MatrixTimesScalar

Conversion from gpu.subgroup_mma_constant_matrix to spirv.MatrixTimesScalar didn't check that the op type was a multiplication and thus would incorrectly convert other elementwise scalar operations.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D140081
mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp
mlir/test/Conversion/GPUToSPIRV/wmma-ops-to-spirv.mlir