[llvm] [offload][sycl] add context parameter to olCreateProgram (PR #218387)

Jan Trusiłło via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 05:23:33 PDT 2026


================
@@ -983,11 +983,14 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
   Error deinit(GenericPluginTy &Plugin);
   virtual Error deinitImpl() = 0;
 
-  /// Load the binary image into the device and return the target table.
+  /// Load the binary image into the device and return the target table. When
+  /// \p Context is null the plugin's driver-scoped default context is used.
----------------
311Volt wrote:

Since `Context == nullptr` can only happen from libomptarget, maybe this special case could be removed, and the entire responsibility of managing a driver-scoped default context could be moved entirely to libomptarget?

Could be done in a future cleanup patch, though. (likely need to first merge https://github.com/llvm/llvm-project/pull/217562 to cleanly implement this)

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


More information about the llvm-commits mailing list