[Mlir-commits] [mlir] [mlir][tosa] CONCAT_SHAPE Op folder (PR #183293)
Luke Hutton
llvmlistbot at llvm.org
Wed Feb 25 05:21:42 PST 2026
================
@@ -2020,6 +2020,40 @@ OpFoldResult tosa::DimOp::fold(FoldAdaptor adaptor) {
return DenseElementsAttr::get(resultAttrTy, dimSize);
}
+OpFoldResult concatShapeFold(tosa::ConcatShapeOp *op) {
+ auto const inputs = op->getInput();
+
+ if (inputs.empty())
+ return {};
+
+ SmallVector<APInt> concatDims;
+ concatDims.reserve(/*max elem*/ 64);
----------------
lhutton1 wrote:
Curious on the choice of 64 here? Is it `MAX_TENSOR_LIST_SIZE`? I wonder how frequently this be the case in practise
https://github.com/llvm/llvm-project/pull/183293
More information about the Mlir-commits
mailing list