[mlir][tosa] Add check if the operand of the operations is constant.
authorTatWai Chong <tatwai.chong@arm.com>
Tue, 21 Mar 2023 20:50:13 +0000 (20:50 +0000)
committerRobert Suderman <suderman@google.com>
Tue, 21 Mar 2023 20:54:47 +0000 (20:54 +0000)
commit08b0977a1925cf0a2cf6f87fcbf1d656e873f7c5
tree377fdef5df1d3fe57c06626487dbc616e625214c
parenta2c63d7f0b77ae92c97974d0630625d83a0745ce
[mlir][tosa] Add check if the operand of the operations is constant.

Some uses of TOSA rely on the constant operands of particular operations,
e.g. paddings and pad_const in pad op. Add a verification pattern in the
validation pass, and this is optionally enabled.

Change-Id: I1628c0840a27ab06ef91150eee56ad4f5ac9543d

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D145412
mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
mlir/test/Dialect/Tosa/invalid.mlir