[Mlir-commits] [mlir] [mlir][tosa]-Edit the verifier of tosa constShapeOp (PR #126962)
Tai Ly
llvmlistbot at llvm.org
Wed Feb 12 12:45:14 PST 2025
================
@@ -2618,6 +2618,10 @@ OpTrait::tosa::verifyTosaShapeOperatorWithSameRanks(Operation *op) {
//===----------------------------------------------------------------------===//
LogicalResult tosa::ConstShapeOp::verify() {
+ // check one dimensional rank
+ auto valuesRank = getValue().getType().getRank();
+ if (valuesRank != 1)
+ return emitOpError("expect elements in attribute value with rank 1");
----------------
Tai78641 wrote:
this is great! thank you. I was just about to work on similar checks.
if you don't mind, would you please add an additional check that
the getValue().getType() has element type which is an index type?
https://github.com/llvm/llvm-project/pull/126962
More information about the Mlir-commits
mailing list