[mlir][tosa] Do not fold transpose with quantized types
authorLei Zhang <antiagainst@google.com>
Fri, 24 Sep 2021 20:57:46 +0000 (16:57 -0400)
committerLei Zhang <antiagainst@google.com>
Fri, 24 Sep 2021 20:57:55 +0000 (16:57 -0400)
commitb45476c94ce8ea94e2ad4d93ceda00eb4078e682
tree4542ede0af7f76238661be4e9b8ce2f6f7791268
parentd5f2013004ef8d2d9995fd45a154744bf7c264e9
[mlir][tosa] Do not fold transpose with quantized types

For such cases, the type of the constant DenseElementsAttr is
different from the transpose op return type.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D110446
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
mlir/test/Dialect/Tosa/canonicalize.mlir