diff --git a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td --- a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td +++ b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td @@ -1667,8 +1667,8 @@ "$_self">])> { code commonExtraClassDeclaration = [{ - int64_t getSourceRank() { return getSource().getType().getRank(); }; - int64_t getDestRank() { return getDest().getType().getRank(); }; + size_t getSourceRank() { return getSource().getType().getRank(); }; + size_t getDestRank() { return getDest().getType().getRank(); }; RankedTensorType getSourceType() { return getSource().getType().cast(); }; RankedTensorType getDestType() { diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp --- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp +++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp @@ -1221,7 +1221,7 @@ "applies to only pack or unpack operations"); if (!op || permutation.empty()) return true; - int64_t innerRank = op.getInnerDimsPos().size(); + size_t innerRank = op.getInnerDimsPos().size(); if (outerOrInnerPerm == OuterOrInnerPerm::Inner) return permutation.size() == innerRank && isPermutationVector(permutation); // op.getOuterDimsPerm() may be empty, in which case it is identity.