<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/offload/plugins-nextgen/common/src/PluginInterface.cpp, branch users/fmayer/spr/wip-smartpointers</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[OpenMP] Adds omp_target_is_accessible routine (#138294)</title>
<updated>2025-10-22T15:35:16+00:00</updated>
<author>
<name>Nicole Aschenbrenner</name>
<email>nicole.aschenbrenner@amd.com</email>
</author>
<published>2025-10-22T15:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=16641ad8a29b6c877a3f934cd61d6acc9719e87e'/>
<id>16641ad8a29b6c877a3f934cd61d6acc9719e87e</id>
<content type='text'>
Adds omp_target_is_accessible routine.
Refactors common code from omp_target_is_present to work for both
routines.

---------

Co-authored-by: Shilei Tian &lt;i@tianshilei.me&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds omp_target_is_accessible routine.
Refactors common code from omp_target_is_present to work for both
routines.

---------

Co-authored-by: Shilei Tian &lt;i@tianshilei.me&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[OFFLOAD] Remove unused init_device_info plugin interface (#162650)</title>
<updated>2025-10-09T13:38:24+00:00</updated>
<author>
<name>Alex Duran</name>
<email>alejandro.duran@intel.com</email>
</author>
<published>2025-10-09T13:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45757b9284cf491072c8c477cd606df8a19061df'/>
<id>45757b9284cf491072c8c477cd606df8a19061df</id>
<content type='text'>
This was used for the old interop code. It's dead code after #143491</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was used for the old interop code. It's dead code after #143491</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Use Error for allocating/deallocating in plugins (#160811)</title>
<updated>2025-09-26T18:50:00+00:00</updated>
<author>
<name>Kevin Sala Penades</name>
<email>salapenades1@llnl.gov</email>
</author>
<published>2025-09-26T18:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=01d761a7769772242fb583eec8f17f6d26d27b6a'/>
<id>01d761a7769772242fb583eec8f17f6d26d27b6a</id>
<content type='text'>
Co-authored-by: Joseph Huber &lt;huberjn@outlook.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Joseph Huber &lt;huberjn@outlook.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Print Image location rather than casting it (#160309)</title>
<updated>2025-09-24T09:57:55+00:00</updated>
<author>
<name>Ross Brunton</name>
<email>bruntonross@protonmail.com</email>
</author>
<published>2025-09-24T09:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e60a5733f01400b5c0ecf3c539e18c4127ce73bc'/>
<id>e60a5733f01400b5c0ecf3c539e18c4127ce73bc</id>
<content type='text'>
This squishes a warning where the runtime tries to bind a StringRef to
a `%p`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This squishes a warning where the runtime tries to bind a StringRef to
a `%p`.</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Remove non-blocking allocation type (#159851)</title>
<updated>2025-09-20T14:07:14+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-09-20T14:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=23efc67e194222a9c14da8e99f183f98cb126c8a'/>
<id>23efc67e194222a9c14da8e99f183f98cb126c8a</id>
<content type='text'>
Summary:
This was originally added in as a hack to work around CUDA's limitation
on allocation. The `libc` implementation now isn't even used for CUDA so
this code is never hit. Even if this case, this code never truly worked.

A true solution would be to use CUDA's virtual memory API instead to
allocate 2MiB slabs independenctly from the normal memory management
done in the stream.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This was originally added in as a hack to work around CUDA's limitation
on allocation. The `libc` implementation now isn't even used for CUDA so
this code is never hit. Even if this case, this code never truly worked.

A true solution would be to use CUDA's virtual memory API instead to
allocate 2MiB slabs independenctly from the normal memory management
done in the stream.</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload]  Implement 'olIsValidBinary' in offload and clean up (#159658)</title>
<updated>2025-09-19T17:15:57+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-09-19T17:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51e3c3d51ba8064c7dafd57bf19e2a54b553af03'/>
<id>51e3c3d51ba8064c7dafd57bf19e2a54b553af03</id>
<content type='text'>
Summary:
This exposes the 'isDeviceCompatible' routine for checking if a binary
*can* be loaded. This is useful if people don't want to consume errors
everywhere when figuring out which image to put to what device.

I don't know if this is a good name, I was thining like `olIsCompatible`
or whatever. Let me know what you think.

Long term I'd like to be able to do something similar to what OpenMP
does where we can conditionally only initialize devices if we need them.
That's going to be support needed if we want this to be more
generic.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This exposes the 'isDeviceCompatible' routine for checking if a binary
*can* be loaded. This is useful if people don't want to consume errors
everywhere when figuring out which image to put to what device.

I don't know if this is a good name, I was thining like `olIsCompatible`
or whatever. Let me know what you think.

Long term I'd like to be able to do something similar to what OpenMP
does where we can conditionally only initialize devices if we need them.
That's going to be support needed if we want this to be more
generic.</pre>
</div>
</content>
</entry>
<entry>
<title>[offload] Fix build with debug libomptarget (#159144)</title>
<updated>2025-09-16T18:40:02+00:00</updated>
<author>
<name>Nick Sarnie</name>
<email>nick.sarnie@intel.com</email>
</author>
<published>2025-09-16T18:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f74583fbe8f4aed755a8c0882cb40cd629e0d598'/>
<id>f74583fbe8f4aed755a8c0882cb40cd629e0d598</id>
<content type='text'>
Currently get this error
```
offload/plugins-nextgen/common/src/PluginInterface.cpp:859:63: error: member reference type 'StringRef' is not a pointer; did you mean to use '.'?
```

We pass the full image binary now so we can't really print anything
useful here.

Seems introduced in https://github.com/llvm/llvm-project/pull/158748.

---------

Signed-off-by: Sarnie, Nick &lt;nick.sarnie@intel.com&gt;
Co-authored-by: Joseph Huber &lt;huberjn@outlook.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently get this error
```
offload/plugins-nextgen/common/src/PluginInterface.cpp:859:63: error: member reference type 'StringRef' is not a pointer; did you mean to use '.'?
```

We pass the full image binary now so we can't really print anything
useful here.

Seems introduced in https://github.com/llvm/llvm-project/pull/158748.

---------

Signed-off-by: Sarnie, Nick &lt;nick.sarnie@intel.com&gt;
Co-authored-by: Joseph Huber &lt;huberjn@outlook.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Copy loaded images into managed storage (#158748)</title>
<updated>2025-09-16T13:57:28+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-09-16T13:57:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e7101dac9cbdad08696a05b4b73ed76c20a6f2fc'/>
<id>e7101dac9cbdad08696a05b4b73ed76c20a6f2fc</id>
<content type='text'>
Summary:
Currently we have this `__tgt_device_image` indirection which just takes
a reference to some pointers. This was all find and good when the only
usage of this was from a section of GPU code that came from an ELF
constant section. However, we have expanded beyond that and now need to
worry about managing lifetimes. We have code that references the image
even after it was loaded internally. This patch changes the
implementation to instaed copy the memory buffer and manage it locally.

This PR reworks the JIT and other image handling to directly manage its
own memory. We now don't need to duplicate this behavior externally at
the Offload API level. Also we actually free these if the user unloads
them.

Upside, less likely to crash and burn. Downside, more latency when
loading an image.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Currently we have this `__tgt_device_image` indirection which just takes
a reference to some pointers. This was all find and good when the only
usage of this was from a section of GPU code that came from an ELF
constant section. However, we have expanded beyond that and now need to
worry about managing lifetimes. We have code that references the image
even after it was loaded internally. This patch changes the
implementation to instaed copy the memory buffer and manage it locally.

This PR reworks the JIT and other image handling to directly manage its
own memory. We now don't need to duplicate this behavior externally at
the Offload API level. Also we actually free these if the user unloads
them.

Upside, less likely to crash and burn. Downside, more latency when
loading an image.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP] Move `__omp_rtl_data_environment' handling to OpenMP (#157182)</title>
<updated>2025-09-08T14:58:38+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-09-08T14:58:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d550bf41ca52348bf11a0fb357df01a5b1684c8'/>
<id>5d550bf41ca52348bf11a0fb357df01a5b1684c8</id>
<content type='text'>
Summary:
This operation is done every time we load a binary, this behavior should
be moved into OpenMP since it concerns an OpenMP specific data struct.
This is a little messy, because ideally we should only be using public
APIs, but more can be extracted later.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This operation is done every time we load a binary, this behavior should
be moved into OpenMP since it concerns an OpenMP specific data struct.
This is a little messy, because ideally we should only be using public
APIs, but more can be extracted later.</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Improve `olDestroyQueue` logic (#153041)</title>
<updated>2025-08-29T08:39:00+00:00</updated>
<author>
<name>Ross Brunton</name>
<email>ross@codeplay.com</email>
</author>
<published>2025-08-29T08:39:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e5d8bd3d1ecd512be3dfa233bc41f32e26c750a'/>
<id>9e5d8bd3d1ecd512be3dfa233bc41f32e26c750a</id>
<content type='text'>
Previously, `olDestroyQueue` would not actually destroy the queue,
instead leaving it for the device to clean up when it was destroyed.
Now, the queue is either released immediately if it is complete or put
into a list of "pending" queues if it is not. Whenever we create a new
queue, we check this list to see if any are now completed. If there are
any we release their resources and use them instead of pulling from
the pool.

This prevents long running programs that create and drop many queues
without syncing them from leaking memory all over the place.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, `olDestroyQueue` would not actually destroy the queue,
instead leaving it for the device to clean up when it was destroyed.
Now, the queue is either released immediately if it is complete or put
into a list of "pending" queues if it is not. Whenever we create a new
queue, we check this list to see if any are now completed. If there are
any we release their resources and use them instead of pulling from
the pool.

This prevents long running programs that create and drop many queues
without syncing them from leaking memory all over the place.</pre>
</div>
</content>
</entry>
</feed>
