diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp --- a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp +++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp @@ -31,7 +31,7 @@ // Element type, rank and memory space must match. if (srcType.getElementType() != destType.getElementType()) return failure(); - if (srcType.getMemorySpaceAsInt() != destType.getMemorySpaceAsInt()) + if (srcType.getMemorySpace() != destType.getMemorySpace()) return failure(); if (srcType.getRank() != destType.getRank()) return failure(); diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp --- a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp @@ -154,7 +154,7 @@ auto memrefType = memref.getType().cast(); auto allocType = MemRefType::get(memrefType.getShape(), memrefType.getElementType(), - AffineMap(), memrefType.getMemorySpaceAsInt()); + AffineMap(), memrefType.getMemorySpace()); Value outParam = builder.create(op.getLoc(), allocType); if (!hasStaticIdentityLayout(memrefType)) { // Layout maps are already checked in `updateFuncOp`.