[Mlir-commits] [mlir] [mlir][tosa] Verify the output shape of tosa.mul and tosa.rescale (PR #193952)
Sayan Saha
llvmlistbot at llvm.org
Fri Apr 24 06:23:18 PDT 2026
================
@@ -662,6 +662,21 @@ static void printShapeToDiagnostic(InFlightDiagnostic &diag,
llvm::interleaveComma(shape, diag, printDim);
}
+static LogicalResult
+verifyOutputShapeCompatibleWithExpected(Operation *op, ShapedType outputType,
+ ArrayRef<int64_t> expectedShape,
+ StringRef outputName = "output") {
+ if (succeeded(verifyCompatibleShape(outputType.getShape(), expectedShape)))
----------------
sahas3 wrote:
I think `getShape` will assert for `UnrankedTensorType` since `hasRank` will fail? Can we add an explicit assert here to help readability -- or maybe accept outputType as RankedTensorType ?
https://github.com/llvm/llvm-project/pull/193952
More information about the Mlir-commits
mailing list