[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 Mar 27 15:02:02 PDT 2026
================
@@ -18,6 +18,20 @@
_LIBSYCL_BEGIN_NAMESPACE_SYCL
namespace detail {
+ProgramWrapper::ProgramWrapper(ol_device_handle_t Device,
+ DeviceImageWrapper &DevImage) {
+ assert(Device);
+
+ callAndThrow(olCreateProgram, Device, DevImage.getRawData().ImageStart,
+ DevImage.getSize(), &MProgram);
+}
+
+ProgramWrapper::~ProgramWrapper() {
+ assert(MProgram);
+ std::ignore = olDestroyProgram(MProgram);
----------------
YuriPlyakhin wrote:
```suggestion
if (MProgram)
std::ignore = olDestroyProgram(MProgram);
```
https://github.com/llvm/llvm-project/pull/188794
More information about the llvm-branch-commits
mailing list