[llvm-branch-commits] [llvm] [libsycl] Add liboffload kernel creation (PR #188794)

Yury Plyakhin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 3 13:59:36 PDT 2026


================
@@ -74,21 +115,70 @@ class ProgramManager {
   /// \param KernelName a null-terminated string representing the name of the
   /// kernel to obtain a device image for.
   /// \param KernelID a kernel id matching KernelName.
-  /// \param DeviceImpl a device with which device image must be compatible.
+  /// \param Device a device with which device image must be compatible.
   /// \throw sycl::exception with sycl::errc::runtime if the device image
   /// validation failed in liboffload or if no compatible image was found.
   DeviceImageWrapper *getDeviceImage(std::string_view KernelName,
                                      const kernel_id &KernelID,
                                      DeviceImpl &Device);
 
+  /// Searches for or creates a program.
+  /// This call must be protected with mutex since it updates MPrograms and
----------------
YuriPlyakhin wrote:

nit
Could you please specify the mutex that should be used here and in similar cases below. For example,
`This call must be protected with MKernelCollectionsMutex since...`

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


More information about the llvm-branch-commits mailing list