[Mlir-commits] [mlir] [MLIR] Pass hostShared flag in gpu.alloc op to runtime wrappers (PR #66401)
Guray Ozen
llvmlistbot at llvm.org
Fri Sep 15 00:18:21 PDT 2023
================
@@ -811,8 +811,13 @@ LogicalResult ConvertAllocOpToGpuRuntimeCallPattern::matchAndRewrite(
// descriptor.
Type elementPtrType = this->getElementPtrType(memRefType);
auto stream = adaptor.getAsyncDependencies().front();
+
+ auto isHostShared = rewriter.create<mlir::LLVM::ConstantOp>(
+ loc, llvmInt64Type, rewriter.getI64IntegerAttr(isShared));
+
Value allocatedPtr =
- allocCallBuilder.create(loc, rewriter, {sizeBytes, stream}).getResult();
+ allocCallBuilder.create(loc, rewriter, {sizeBytes, stream, isHostShared})
----------------
grypp wrote:
I thought we had a consensus about avoiding the use of `host_shared` and `async` because of USM's limitation in handling asynchronous data allocation. Are we still on the same page with this?
https://github.com/llvm/llvm-project/pull/65539#discussion_r1320546363
https://github.com/llvm/llvm-project/pull/66401
More information about the Mlir-commits
mailing list