<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/offload/liboffload, branch main</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>[Offload] Add device info for shared memory (#167817)</title>
<updated>2025-11-13T19:00:12+00:00</updated>
<author>
<name>Kevin Sala Penades</name>
<email>salapenades1@llnl.gov</email>
</author>
<published>2025-11-13T19:00:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1a86f0aae76539d1771e473df40f4511fdd2cae9'/>
<id>1a86f0aae76539d1771e473df40f4511fdd2cae9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Add device UID (#164391)</title>
<updated>2025-11-04T19:15:47+00:00</updated>
<author>
<name>Robert Imschweiler</name>
<email>robert.imschweiler@amd.com</email>
</author>
<published>2025-11-04T19:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dc94f2cbadfd192fe3d43bd00fd5a1d0ead5ab8d'/>
<id>dc94f2cbadfd192fe3d43bd00fd5a1d0ead5ab8d</id>
<content type='text'>
Introduced in OpenMP 6.0, the device UID shall be a unique identifier of
a device on a given system. (Not necessarily a UUID.) Since it is not
guaranteed that the (U)UIDs defined by the device vendor libraries, such
as HSA, do not overlap with those of other vendors, the device UIDs in
offload are always combined with the offload plugin name. In case the
vendor library does not specify any device UID for a given device, we
fall back to the offload-internal device ID.
The device UID can be retrieved using the `llvm-offload-device-info`
tool.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduced in OpenMP 6.0, the device UID shall be a unique identifier of
a device on a given system. (Not necessarily a UUID.) Since it is not
guaranteed that the (U)UIDs defined by the device vendor libraries, such
as HSA, do not overlap with those of other vendors, the device UIDs in
offload are always combined with the offload plugin name. In case the
vendor library does not specify any device UID for a given device, we
fall back to the offload-internal device ID.
The device UID can be retrieved using the `llvm-offload-device-info`
tool.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Offload] Lazily initialize platforms in the Offloading API" (#163272)</title>
<updated>2025-10-14T17:46:55+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-10-14T17:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=227bc5786fbd4111c7ec2ed2874be16158c452e4'/>
<id>227bc5786fbd4111c7ec2ed2874be16158c452e4</id>
<content type='text'>
Summary:
This causes issues with CUDA's teardown order when the init is separated
from the total init scope.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This causes issues with CUDA's teardown order when the init is separated
from the total init scope.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Lazily initialize platforms in the Offloading API (#163272)</title>
<updated>2025-10-14T14:35:53+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-10-14T14:35:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4a35c4d38af4844f26d944047ca1f6aefd6a0eff'/>
<id>4a35c4d38af4844f26d944047ca1f6aefd6a0eff</id>
<content type='text'>
Summary:
The Offloading library wraps around the underlying plugins. The problem
is that we currently initialize all plugins we find, even if they are
not needed for the program. This is very expensive for trivial uses, as
fully heterogenous usage is quite rare. In practice this means that you
will always pay a 200 ms penalty for having CUDA installed.

This patch changes the behavior to provide accessors into the plugins
and devices that allows them to be initialized lazily. We use a
once_flag, this should properly take a fast-path check while still
blocking on concurrent use.

Making full use of this will require a way to filter platforms more
specifically. I'm thinking of what this would look like as an API.
I'm thinking that we either have an extra iterate function that takes a
callback on the platform, or we just provide a helper to find all the
devices that can run a given image. Maybe both?

Fixes: https://github.com/llvm/llvm-project/issues/159636</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The Offloading library wraps around the underlying plugins. The problem
is that we currently initialize all plugins we find, even if they are
not needed for the program. This is very expensive for trivial uses, as
fully heterogenous usage is quite rare. In practice this means that you
will always pay a 200 ms penalty for having CUDA installed.

This patch changes the behavior to provide accessors into the plugins
and devices that allows them to be initialized lazily. We use a
once_flag, this should properly take a fast-path check while still
blocking on concurrent use.

Making full use of this will require a way to filter platforms more
specifically. I'm thinking of what this would look like as an API.
I'm thinking that we either have an extra iterate function that takes a
callback on the platform, or we just provide a helper to find all the
devices that can run a given image. Maybe both?

Fixes: https://github.com/llvm/llvm-project/issues/159636</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Fix isValidBinary segfault on host platform</title>
<updated>2025-10-06T19:46:50+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-10-06T19:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=095877c12ec6aed1fd02964e5c3b1283ff2df073'/>
<id>095877c12ec6aed1fd02964e5c3b1283ff2df073</id>
<content type='text'>
Summary:
Need to verify this actually has a device. We really need to rework this
to point to a real impolementation, or streamline it to handle this
automatically.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Need to verify this actually has a device. We really need to rework this
to point to a real impolementation, or streamline it to handle this
automatically.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload][NFC] use unique ptrs for platforms (#160888)</title>
<updated>2025-09-29T12:10:26+00:00</updated>
<author>
<name>Piotr Balcer</name>
<email>piotr.balcer@intel.com</email>
</author>
<published>2025-09-29T12:10:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=23d08af3d422f10d180af1e0b6261b65f76dfeed'/>
<id>23d08af3d422f10d180af1e0b6261b65f76dfeed</id>
<content type='text'>
Currently, devices store a raw pointer to back to their owning Platform.
Platforms are stored directly inside of a vector. Modifying this vector
risks invalidating all the platform pointers stored in devices.

This patch allocates platforms individually, and changes devices to
store a reference to its platform instead of a pointer. This is safe,
because platforms are guaranteed to outlive the devices they contain.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, devices store a raw pointer to back to their owning Platform.
Platforms are stored directly inside of a vector. Modifying this vector
risks invalidating all the platform pointers stored in devices.

This patch allocates platforms individually, and changes devices to
store a reference to its platform instead of a pointer. This is safe,
because platforms are guaranteed to outlive the devices they contain.</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Add olGetMemInfo with platform-less API (#159581)</title>
<updated>2025-09-24T11:17:57+00:00</updated>
<author>
<name>Ross Brunton</name>
<email>bruntonross@protonmail.com</email>
</author>
<published>2025-09-24T11:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ea0e5185e2bd9d1de7c422b2c692c6f52a61ecfa'/>
<id>ea0e5185e2bd9d1de7c422b2c692c6f52a61ecfa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Don't add the unsupported host plugin to the list (#159642)</title>
<updated>2025-09-23T13:31:35+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-09-23T13:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=204580aa8e157ea6b96b94d19513b17c53532ff0'/>
<id>204580aa8e157ea6b96b94d19513b17c53532ff0</id>
<content type='text'>
Summary:
The host plugin is basically OpenMP specific and doesn't work very well.
Previously we were skipping over it in the list instead of just not
adding it at all.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The host plugin is basically OpenMP specific and doesn't work very well.
Previously we were skipping over it in the list instead of just not
adding it at all.</pre>
</div>
</content>
</entry>
<entry>
<title>[Offload] Re-allocate overlapping memory (#159567)</title>
<updated>2025-09-23T12:59:52+00:00</updated>
<author>
<name>Ross Brunton</name>
<email>bruntonross@protonmail.com</email>
</author>
<published>2025-09-23T12:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fcebe6bdbb2a7e5fec50504ba1d610c0e7028740'/>
<id>fcebe6bdbb2a7e5fec50504ba1d610c0e7028740</id>
<content type='text'>
If olMemAlloc happens to allocate memory that was already allocated
elsewhere (possibly by another device on another platform), it is now
thrown away and a new allocation generated.

A new `AllocBases` vector is now available, which is an ordered list
of allocation start addresses.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If olMemAlloc happens to allocate memory that was already allocated
elsewhere (possibly by another device on another platform), it is now
thrown away and a new allocation generated.

A new `AllocBases` vector is now available, which is an ordered list
of allocation start addresses.</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>
</feed>
