[mlir][spirv] Relax restriction on pointer type for CooperativeMatrix load/store
authorThomas Raoux <thomasraoux@google.com>
Fri, 31 Jul 2020 15:02:21 +0000 (08:02 -0700)
committerThomas Raoux <thomasraoux@google.com>
Fri, 31 Jul 2020 15:02:21 +0000 (08:02 -0700)
commitcfb955ac370cb724c51423a05694aaf5b70903a4
tree28438e70d42c2022529dbd9d3006f421f18f162b
parent30e45f339eb0841dc7fe27fad119cc5db0c052f3
[mlir][spirv] Relax restriction on pointer type for CooperativeMatrix load/store

This change allow CooperativeMatrix Load/Store operations to use pointer type
that may not match the matrix element type. This allow us to declare buffer
with a larger type size than the matrix element type. This follows SPIR-V spec
and this is needed to be able to use cooperative matrix in combination with
shared local memory efficiently.

Differential Revision: https://reviews.llvm.org/D84993
mlir/include/mlir/Dialect/SPIRV/SPIRVCooperativeMatrixOps.td
mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
mlir/test/Dialect/SPIRV/Serialization/cooperative-matrix.mlir
mlir/test/Dialect/SPIRV/cooperative-matrix.mlir