[Mlir-commits] [mlir] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

Fabian Mora llvmlistbot at llvm.org
Fri Nov 10 07:09:39 PST 2023


================
@@ -377,10 +394,21 @@ llvm::LaunchKernel::createKernelLaunch(mlir::gpu::LaunchFuncOp op,
   if (!binary)
     return op.emitError() << "Couldn't find the binary: " << binaryIdentifier;
 
+  llvm::Constant *paramsCount =
+      llvm::ConstantInt::get(i64Ty, op.getNumKernelOperands());
+
+  std::string binarySizeIdentifier = getBinarySizeIdentifier(moduleName);
+  Value *binarySizeVar = module.getGlobalVariable(binarySizeIdentifier, true);
----------------
fabianmcg wrote:

Why can't you use the initializer in `Value *binary = module.getGlobalVariable(binaryIdentifier, true);` to obtain the size of the binary?

https://github.com/llvm/llvm-project/pull/71430


More information about the Mlir-commits mailing list