[mlir][tosa][fix] Add proper type checking trait for tosa mul
authorTatWai Chong <tatwai.chong@arm.com>
Fri, 21 Jul 2023 23:28:45 +0000 (16:28 -0700)
committerEric Kunze <eric.kunze@arm.com>
Fri, 21 Jul 2023 23:29:05 +0000 (23:29 +0000)
commita5f0b237be7f2d50efdccd8d6a95edd05c8fd52f
treefd33474ced8e9ab6964d65d5f4ffff7632620bba
parente4ad1f976d1209b8ff233e6aab924f92b7484c2d
[mlir][tosa][fix] Add proper type checking trait for tosa mul

when operating integer type tensors, tosa elementwise multiplication
requires the element type of result to be a 32-bit integer rather
than the same type as inputs.

Change-Id: Ifd3d7ebd879be5c6b2c8e23aa6d7ef41f39c6d41

Reviewed By: mgehre-amd

Differential Revision: https://reviews.llvm.org/D154988
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
mlir/test/Dialect/Tosa/constant-op-fold.mlir
mlir/test/Dialect/Tosa/ops.mlir