diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td @@ -688,10 +688,6 @@ } ``` }]; - let builders = [ - OpBuilder<(ins "int64_t":$dim), - [{ build($_builder, $_state, $_builder.getIndexType(), dim); }]> - ]; let assemblyFormat = [{ $dim attr-dict `:` type($result) }]; } diff --git a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp @@ -153,8 +153,8 @@ std::max(producer.getNumLoops(), consumer.getNumLoops()); SmallVector fusedIndices; fusedIndices.reserve(numFusedOpLoops); - llvm::transform(llvm::seq(0, numFusedOpLoops), - std::back_inserter(fusedIndices), [&](int64_t dim) { + llvm::transform(llvm::seq(0, numFusedOpLoops), + std::back_inserter(fusedIndices), [&](uint64_t dim) { return rewriter.create(producer.getLoc(), dim); }); for (IndexOp indexOp : diff --git a/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp b/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp @@ -93,8 +93,8 @@ rewriter.setInsertionPoint(indexOp); SmallVector allIndices; allIndices.reserve(op.getNumLoops()); - llvm::transform(llvm::seq(0, op.getNumLoops()), - std::back_inserter(allIndices), [&](int64_t dim) { + llvm::transform(llvm::seq(0, op.getNumLoops()), + std::back_inserter(allIndices), [&](uint64_t dim) { return rewriter.create(indexOp->getLoc(), dim); }); rewriter.replaceOpWithNewOp(