================
@@ -660,3 +1079,22 @@ Error offloading::wrapHIPBinary(Module &M, ArrayRef<char> 
Image,
                                EmitSurfacesAndTextures);
   return Error::success();
 }
+
+Error llvm::offloading::wrapSYCLBinaries(llvm::Module &M, ArrayRef<char> 
Buffer,
+                                         SYCLJITOptions Options) {
+  SYCLWrapper W(M, Options);
+  MemoryBufferRef MBR(StringRef(Buffer.begin(), Buffer.size()),
+                      /*Identifier*/ "");
+  SmallVector<OffloadFile> OffloadFiles;
+  if (Error E = extractOffloadBinaries(MBR, OffloadFiles))
+    return E;
+
+  GlobalVariable *Desc = W.createFatbinDesc(OffloadFiles);
+  if (!Desc)
+    return createStringError(inconvertibleErrorCode(),
+                             "No binary descriptors created.");
----------------
maksimsab wrote:

In fact, both options don't follow LLVM's guideline because we don't add any 
useful piece of information.

https://github.com/llvm/llvm-project/pull/147508
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to