[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 26 08:36:07 PDT 2025
================
@@ -52,6 +54,23 @@ LLVM_ABI llvm::Error wrapHIPBinary(llvm::Module &M, llvm::ArrayRef<char> Images,
EntryArrayTy EntryArray,
llvm::StringRef Suffix = "",
bool EmitSurfacesAndTextures = true);
+
+struct SYCLJITOptions {
+ // Target/compiler specific options that are suggested to use to "compile"
+ // program at runtime.
+ std::string CompileOptions;
+ // Target/compiler specific options that are suggested to use to "link"
+ // program at runtime.
+ std::string LinkOptions;
+};
+
+/// Wraps OffloadBinaries in the given \p Buffers into the module \p M
+/// as global symbols and registers the images with the SYCL Runtime.
+/// \param Options Data that needs to be encoded for the later use in a runtime.
+LLVM_ABI llvm::Error
+wrapSYCLBinaries(llvm::Module &M, llvm::ArrayRef<char> Buffer,
+ SYCLJITOptions Options = SYCLJITOptions());
----------------
sarnex wrote:
nit that can be addressed in follow-up: are there any cases where a caller wouldnt want to pass SYCLJitOptions? AOT mode?
https://github.com/llvm/llvm-project/pull/147508
More information about the cfe-commits
mailing list