[Mlir-commits] [mlir] [MLIR] Pass hostShared flag in gpu.alloc op to runtime wrappers (PR #66401)
Guray Ozen
llvmlistbot at llvm.org
Mon Sep 25 00:14:42 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:
Awesome thanks! Sure, it sounds good me to.
Let me know if there is anything else to do cuda runtime lowering.
https://github.com/llvm/llvm-project/pull/66401
More information about the Mlir-commits
mailing list