diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp --- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp +++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp @@ -614,7 +614,7 @@ operands.push_back(operand); indexingMaps.push_back(AffineMap::get( - /*dimCount=*/type.getRank(), /*symbolCount=*/0, affineExprs, + /*dimCount=*/rank, /*symbolCount=*/0, affineExprs, rewriter.getContext())); }