[clang] [MLIR] Enabling Intel GPU Integration. (PR #65539)
    Nishant Patel via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Sep 12 11:23:21 PDT 2023
    
    
  
================
@@ -811,8 +812,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})
+          .getResult();
----------------
nbpatel wrote:
the upstream GPUToLLVMConversion lowering does not support lowering of gpu.alloc which is not async? 
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp#L797 
https://github.com/llvm/llvm-project/pull/65539
    
    
More information about the cfe-commits
mailing list