Commit graph

879 commits

Author SHA1 Message Date
Joseph Huber
14ec3c42ce
[Offload] add 'olIterateSymbols' runtime function (#213036)
Summary:
This provides users with a way to check all symbols present in a given
program. This is useful for many cases where a power user wants to do
something dynamic with the objects present.
2026-07-31 14:29:06 -05:00
Nick Sarnie
5d4cd81d0e
[offload][lit] Re-enable olCreateProgram JIT test on AMDGPU (#213321)
Should be passing now.

Context: https://github.com/llvm/llvm-project/pull/213149

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-07-31 18:07:04 +00:00
Nick Sarnie
3e65a09adc
[ClangLinkerWrapper][SPIRV] Fix embed bitcode option (#213137)
We need to pass the right linker option and not try to containerize it.

Fixes two OpenMP offload JIT tests, the other has some front end assert
I will look at.

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-31 14:49:09 +00:00
Abhinav Gaba
a1d93f19be
[OpenMP][Offload] Fix use-after-free of the packed firstprivate transfer buffer (#212905)
`packAndTransfer()` called `submitData()`, which captured the address of
the data of
the `SmallVector` member of `PrivateArgumentManagerTy`, as the host
source of an
async transfer. The manager was later moved into an `AsyncInfo`
post-processing
lambda, changing the underlying address of the data:
`addPostProcessingFunction()`
copies the closure rather than moving it, but even if it "moved", the
address of the data owned by `SmallVector`'s inline capacity would have
changed.

The AMDGPU plugin read from the stale host source address when doing the
actual transfer.

Fix: allocate the packed buffer via
`getOrCreateSourceBufferForSubmitData()`, so
that `AsyncInfo` owns it. The non-packed
corresponding-pointer-initialization
path in this same class already built its source buffer that way.
2026-07-30 16:17:20 -07:00
Kewen Meng
f279abcc81
[Offload][Test] Add llvm bin in the PATH for offload-unit suite (#213149)
This PR makes the offload-unit suite put llvm bin directory on PATH so
that tests need lld can find. It fixes the issue exposed in:
https://github.com/llvm/llvm-project/pull/212860
2026-07-30 21:24:25 +00:00
Nick Sarnie
b6e3037f6e
[offload][lit] Disable failing olCreateProgram test on AMD (#213126)
Fails with an error about not being able to find `lld`. AMD team is
investigating, but disable the test in the meantime.

Context: https://github.com/llvm/llvm-project/pull/212860

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-07-30 20:19:15 +00:00
Nick Sarnie
cb0944c34b
[offload][lit] Add jit unittest (#212860)
Basic test for the JIT path.

Context: https://github.com/llvm/llvm-project/pull/212823

---------

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-07-30 14:10:42 +00:00
fineg74
a42bed3f72
[OFFLOAD] Add JIT support for SPIRV backend (#212823)
This PR adds support for SPIRV to plugins JIT. It is required in cases
when kernel is supplied in bitcode format for spirv triple.
2026-07-29 18:10:03 +00:00
Weronika Lewandowska
ebc5778e5d
[Offload] Enable offload test on Windows (#212480)
Description:
This change enables the offload test build on Windows by adding
compatibility guards around libomptarget test suites.

Why:
libomptarget is not available on Windows. Without these guards, CMake
fails when referencing the missing omptarget target. With these guards,
Windows builds complete successfully and run available tests (using
check-offload-unit), while Linux/macOS builds remain unaffected.
2026-07-29 11:13:22 +02:00
Abhinav Gaba
1a2691c3d3
[NFC][OpenMP] Add mapper-specific tests exercising pointee section mapping. (#204269)
* Add a few tests for when a mapper does something like `map(s.p[0:10])`
where `p` is a pointer.
* Add a few tests that require propagation of bits like `present/always`
into a mapper.
* Fix a few tests that were expecting `p` to be mapped when the mapper
only said `map(s.p[0:10])`.

The output of a few tests is different from what we expect. They have
been annotated with FIXMEs, and the expected output for when the
follow-up changes in this stack to propagate the map-type-modifier bits
and using attach-style mapping for mappers get merged.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-28 11:27:03 -07:00
Nick Sarnie
760fc01733
[offload][lit] Run check-offload-unit as part of check-all (#212513)
I tried to do `check-offload` instead but that
[caused](https://github.com/llvm/llvm-project/pull/212500) a bloodbath,
so just enable `check-offload-unit` as part of `check-all`.

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-07-28 14:53:22 +00:00
Nick Sarnie
b976ce0867
Revert "[offload][lit] Run check-offload as part of check-all" (#212506)
Reverts llvm/llvm-project#212500
2026-07-28 14:22:46 +00:00
Nick Sarnie
3d325269ec
[offload][lit] Run check-offload as part of check-all (#212500)
It's unclear why these were excluded from `check-all`, but we made all
tests pass on Level Zero and our local testing shows they pass on AMD
and NVIDIA too, so enable it by default.

Context: https://github.com/llvm/llvm-project/pull/211633

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-07-28 14:15:45 +00:00
Alex Duran
34be3a62bf
[OFFLOAD][L0][NFC] Mark as skip unittest with driver issue (#212466) 2026-07-28 15:40:47 +02:00
Alex Duran
7677166579
[OFFLOAD][L0] Fix zero argurment kernel launch (#212296)
PR #205224 changed the path for kernels with no arguments to not use
appendLaunchKernelWithArgs, while at the same time it removed
zeKernelSetGroupSize which resulted in incorrect sizing of the kernel.

This PR removes the alternate path and makes sure all launches go
through appendLaunchKernelWithArgs.

Alternatively we can restore zeKernelSetGroupSize on the alternate path.
2026-07-27 21:44:06 +02:00
Łukasz Plewa
47e51bdd4f
[offload] Split olMemAlloc to separate functions (#209196)
At the previous community meeting, we agreed to introduce contexts into
the liboffload API. I also mentioned that, as part of this work, we
could split the allocation function into three separate functions, but
we did not discuss this idea in detail.

This patch only splits the allocation functions, allowing us to discuss
and agree on the proposed interface before introducing contexts into the
`olMemAlloc` API.

Once contexts are added, the device parameter will be removed from host
allocations, and the final interface would look like this:

```c
ol_result_t olMemAllocDevice(ol_context_handle_t, ol_device_handle_t, size_t, void **);
ol_result_t olMemAllocHost(ol_context_handle_t, size_t, void **);
ol_result_t olMemAllocManaged(ol_context_handle_t, ol_device_handle_t, size_t, void **);
```

Currently, for host allocations, the device parameter is required mainly
to determine which plugin should perform the allocation. Once contexts
are introduced, this information will be provided by the context, making
the device parameter redundant.

Requiring both a context and a device for host allocations could also be
misleading, since it is unclear what the device parameter actually
represents in this API.

Assisted by: Claude.
2026-07-27 12:28:16 +02:00
blazej-smorawski
cf08d4bc70
[offload] Align style of level zero plugin with llvm coding standard (#211762)
This patch does a small cleanup of level zero plugin. Mainly I changed
names of variables to use `CamelCase` whenever they relate to our
internal structures - not objects coming directly from level zero API
etc., so I left some variables and arguments like `zeDevice`, but only
if they are directly related to level zero APIs or structures.

Added a few `auto *` declarations, but again - only when they refer to
our internal objects and not to structures from level zero which might
be pointers underneath, but we use them as transparent objects.

Also did small cleanup of unused headers, making sure that we include
directly what we need rather than use transitive dependencies.

@adurang Please let me know if this patch is okay with you, if you think
this will cause more harm then it's worth I'll close it.

---------

Co-authored-by: Łukasz Plewa <lukasz.plewa@intel.com>
2026-07-27 11:48:47 +02:00
Łukasz Plewa
ecd8d61126
[Offload] Add olCreateContext / olDestroyContext / olGetContextInfo API (#209144)
Add the initial Context handle API to liboffload:
  - olCreateContext / olDestroyContext
  - olGetContextInfo / olGetContextInfoSize
  - OL_ERRC_INVALID_CONTEXT error code
  - OL_CONTEXT_INFO_{NUM_DEVICES,DEVICES,PLATFORM} queries
  
This is the first patch in a series. I decided to split the original
change into multiple smaller PRs to make the review process faster and
more manageable.
This patch introduces context management functions, but the context
handle is not used anywhere yet. The following patches will extend the
API to use contexts in:
``` c
  ol_result_t olMemAlloc(ol_context_handle_t, ol_device_handle_t, ol_alloc_type_t, size_t, void**);
  ol_result_t olMemFree(ol_context_handle_t, void*); ​
  ol_result_t olGetMemInfo(ol_context_handle_t, const void*, ol_mem_info_t, size_t, void*);​
  ol_result_t olGetMemInfoSize(ol_context_handle_t, const void*, ol_mem_info_t, size_t*);​
  ol_result_t olCreateQueue(ol_context_handle_t, ol_device_handle_t, ol_queue_handle_t*);
  ol_result_t olCreateProgram(ol_context_handle_t, ol_device_handle_t, const void*, size_t, ol_program_handle_t*); 
```

You can also take a look at #201398, which contains the first version of
the complete change. I'm cleaning it up as I go, so the patches in this
series are not a direct 1:1 split of that PR.
2026-07-27 11:30:23 +02:00
Alex Duran
dc21971950
[OFFLOAD][L0] Properly consume errors in program validation (#211799)
Some of the program unittests were failing because errors weren't
consumed properly.
2026-07-24 16:49:57 +02:00
Alex Duran
1e7c2ac978
[OFFLOAD] Add level_zero to list of default plugins (#210070)
Adds level_zero to the list of LIBOMPTARGET_ALL_PLUGIN_TARGETS which are
build by default.
2026-07-23 18:48:56 +02:00
Alex Duran
7d566aa440
[OFFLOAD][L0] Restore function pointer lookup. (#211520)
PR #201352 incorrectly removed the calls to zeModuleGetGlobalPointer
when looking up a symbol.
2026-07-23 13:42:39 +02:00
Alex Duran
38b7237069
[OFFLOAD][L0] Add NUM_LANES info (#211526) 2026-07-23 13:30:02 +02:00
Wijkqwe
eb05d2657b
[Offload][OpenMP] Skip RPC callback registration when plugin has no devices (#211447)
`__tgt_register_rpc_callback` unconditionally called
`Plugin::getRPCServer()` which asserts if the RPC server pointer is
null. When a plugin is initialized but its RPC server has not been
created (e.g., `NumDevices == 0` in `GenericPluginTy::init()`), this
triggers a crash.

Rather than introducing a nullable accessor, guard the call by also
checking that the plugin has at least one device. A zero-device plugin
has no RPC server to register callbacks with, so the extra check is both
correct and sufficient.

Suggested by @jhuber6 in the review of the previous attempt (#210215).
2026-07-23 02:30:22 +00:00
Sophia Herrmann
21a3890972
[Offload] Add numLanes device info to liboffload (#211380)
This adds `OL_DEVICE_INFO_NUM_LANES` to the Offload API device-info enum
and wires it through `olGetDeviceInfo`.
2026-07-22 20:32:00 -05:00
Joseph Huber
4e0a25590e
[LLVM] Remove 'LLVM_LIBC_GPU_BUILD' logic (#211265)
Summary:
This is a holdover from how we used to handle this stuff. We should just
dirctly check the triple for setting the cross-compiling emulator and we
can directly introspect into the  build tree for the lit config like we
already do for flang-rt.
2026-07-22 11:11:55 -05:00
Wenju He
bcde1af59d
[OFFLOAD][L0] Fix PatternSize assert in L0QueueTy::memoryFill (#210867)
The message was the opposite of the assert condition.

In addition, when PatternSize == Size the caller wants to fill the
region with exactly one copy of the pattern, which is a valid operation.

The issue was found by AI.

Also check `Size % PatternSize == 0` per L0 spec.
2026-07-21 11:20:16 +02:00
311Volt
d90634dc18
[offload] support arbitrary memoryFill pattern sizes in L0 plugin (#209724)
Even though L0, CUDA and HSA do not directly support filling memory
regions with non-power-of-two-sized patterns, plugins explicitly allow
for such fills by falling back to a slow path whenever a direct API call
is not possible.

The Level Zero plugin is the odd one out, forwarding directly to
`zeCommandListAppendMemoryFill`. This fails for non-power-of-two
patterns, causing unit tests for `olMemFill` to fail when run on L0.

This PR adds fallbacks in L0 plugin's `memoryFill` implementation to
support arbitrary pattern sizes:
- if all pattern bytes are the same, substitute `1` for `patternSize`
and proceed with the native fill
- if memory is host-accessible (host or shared alloc), then simply
`std::copy_n` the pattern
- if memory is device-only, upload a seed to the device, and
`memoryCopy` O(log n) times, doubling the pattern each time, until the
entire region is filled. The seed is the input pattern, but extended on
the host to 1-2KiB to potentially eliminate several small `memoryCopy`
calls that would otherwise be almost pure overhead.

Conceptually, this approach has better worst-case overhead than the one
found in the CUDA plugin (decompose the pattern to then run multiple
strided memsets) and the AMDGPU one (call `pushMemoryCopyH2DAsync` with
the pattern, setting `NumTimes`). Aligning the fallback fill approaches
is outside the scope of this PR, however - the main intent is to fix the
unit test failures.
2026-07-20 13:28:32 +02:00
Reid Kleckner
93b1240309
[docs] Finish misc MyST migration (#210209)
Tracking issue: #201242
See the [migration guide] for more information.

[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines

This is a stacked PR based on #210208, which is the standalone rename
commit for this miscellaneous Markdown migration batch.

This was prepared with rst2myst plus LLM-assisted cleanup. LLDB man
pages are intentionally left as reStructuredText because LLDB man-page
building should not take on Markdown parser dependencies.

Unfortunately, many of these miscellaneous docs do not have working
standalone doc build targets, so I was not able to render HTML for all
of them. I think the scope is small enough that this is reviewable by
hand.
2026-07-17 11:56:59 -07:00
Reid Kleckner
c42ce32264
[docs] Rename misc rst docs to md (#210208)
Tracking issue: #201242
See the [migration guide] for more information. 

[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines

This is the initial straight rename commit.

Many of these miscellaneous .rst files are not actually part of a real
docs build, since docs/conf.py does not exist for many of them.
2026-07-17 10:48:13 -07:00
Alex Duran
d9d1d919de
[OFFLOAD][L0] Don't return error on initImpl if library/drivers are missing (#210083)
When a Level Zero driver is not present in the environment the current
behavior makes olInit fail if the level_zero plugin is requested. This
changes the behavior to match other plugins where it doesn't fail but
return 0 supported devices.
2026-07-16 22:04:21 +02:00
Alex Duran
006d13e206
[OFFLOAD][L0][NFC] Cleanup dead code (#210060)
As we have done several refactorings lately, some dead code/data was
left behind inadvertedly. This is just cleaning it up.
2026-07-16 15:45:04 +02:00
311Volt
20a86a2fb7
[offload] fix failure of olCreateProgramTest.TruncatedBinary (#210024)
https://github.com/llvm/llvm-project/pull/207208 caused a CI failure on
openmp-offload-amdgpu-clang-flang in the
olCreateProgramTest.TruncatedBinary test.

This PR removes this test case, as it's unclear whether guarding against
such cases is worth it.
2026-07-16 12:37:46 +02:00
311Volt
9b5ad6ee5d
[offload] add translation of plugin-specific error codes to Offload API ECs (#207208)
liboffload plugins would not always exhaustively map the underlying
API's error values to ol_errc_t, resulting in unintended behavior - e.g.
olCreateProgram, given an invalid binary, would return OL_ERRC_UNKNOWN
instead of OL_ERRC_INVALID_BINARY.

This patch largely eliminates the most glaring cases of this by
assigning an ol_errc_t value to every error code of the underlying API
in every plugin. The proper granularity for this mapping is per-API
call, but that is a large rework that belongs in a separate patch.

Assisted-by: Claude
2026-07-16 11:34:28 +02:00
Kewen Meng
ba2be3f8ad
[Offload][AMDGPU] Make compiler-rt libs visible (#209849)
Fixed the failure in offload test after
https://github.com/llvm/llvm-project/pull/209765
2026-07-15 15:57:15 -07:00
Hansang Bae
eecd874fba
[Offload] Remove unnecessary assert (#209518)
`uint32_t` is always greater than or equal to zero.
2026-07-14 15:10:16 -05:00
Akash Banerjee
2a1200e08c
[Flang][OpenMP] Fix Fortran automap handling (#162501)
This fixes Fortran `declare target enter(automap:...)` handling for
allocatable
descriptors.

- Replace the previous `has_device_addr` target-region rewrite with
explicit
  target data operations around allocation/deallocation.
- On allocation, emit:
  - descriptor `map(always,to)` to keep the Fortran descriptor present
  - storage `map(storage)` for the allocated array data
- `map(attach)` to update the device descriptor base address to the
device data
- On deallocation, delete both the mapped storage and descriptor.
- Add a weak visible offload-entry alias for local/hidden `declare
target to/enter`
globals so libomptarget can associate the host descriptor with the real
device
  global without changing the original symbol linkage.

This fixes `offload/test/offloading/fortran/declare-target-automap.f90`
reported broken in #161265.

Co-authored-by: Codex <codex@openai.com>
2026-07-14 16:03:05 +01:00
Kewen Meng
d3e11d415a
[OpenMP][AMDGPU][CI] Fix libc build (#209336)
This PR attempts to fix the error:
```
llvm-lit: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/botworker/builds/openmp-offload-amdgpu-runtime-2/build/llvm.build/runtimes/runtimes-amdgpu-amd-amdhsa-bins/libc/test' contained no tests
error: did not discover any tests for provided path(s)
```

According to lib/test/CMakeList.txt, we need to set
`CMAKE_CROSSCOMPILING_EMULATOR` to avoid early return in the cmake. It
only changes the build script instead of the parent cmake cache file.
Not sure if this is the optimal solution, but it works for us.
2026-07-13 23:46:24 +00:00
Kewen Meng
69c3406d98
[OpenMP][AMDGPU][CI] Update build scripts for AMDGPU bots (#209274)
This should fix the error in bot:
https://lab.llvm.org/buildbot/#/builders/10/builds/31765
2026-07-13 12:25:37 -07:00
Joseph Huber
f3671a14e4
[AMDGPU] Fix cache files and builds after amdgcn->amdgpu conversion (#209247)
Summary:
Quite important that this works before the fork. The problem is that
CMake takes the string literally while rewriting it to amdgpu/
internally so the amdgcn/ directories do not appear.
2026-07-13 12:20:49 -05:00
Robert Imschweiler
83e914e56a
[offload][test] Add fallback to legacy AMDGPU triple library dir (#209131)
After the amdgcn-amd-amdhsa -> amdgpu-amd-amdhsa rename, look up the
device runtime libraries in the legacy directory when the runtime was
built under the old triple name.

Claude assisted with this patch.
2026-07-13 19:16:21 +02:00
Abid Qadeer
abd72b0eb7
[OpenMP] Publish target-init team state with acq_rel barrier (#208701)
In __kmpc_target_init, thread 0 initializes the team state in LDS
(HasThreadState = 0, ThreadStates = nullptr) and then releases the other
threads with synchronize::threadsAligned(atomic::relaxed). Because the
relaxed ordering emits no memory fence, the initializing LDS stores are
not guaranteed to be visible to the worker threads before they proceed.
A worker thread can then read the uninitialized team state and produce
wrong results or crash. This is the flow that causes the race as I
understand it.

```
__kmpc_target_init                                    (Kernel.cpp:107)
  -> initializeRuntime                                (Kernel.cpp:38)
       -> state::init                                         (State.cpp:286)
            -> TeamState.init(IsSPMD)                 (State.cpp:295)
                 -> HasThreadState = false            (State.cpp:248)   // <-- the value later read stale
               ThreadStates = nullptr                 (State.cpp:296)
  -> synchronize::threadsAligned(atomic::relaxed)     (Kernel.cpp:115)  // <-- insufficient barrier:
     //     relaxed emits no fence, so the state stores above are not published to the other threads

        ... worker threads continue past the barrier ...

__kmpc_parallel_60                                    (Parallelism.cpp:143)
  if (OMP_UNLIKELY(!if_expr || state::HasThreadState || ...))   (Parallelism.cpp:158)
        ^ reads HasThreadState from LDS; a stale/unpublished value (!= 0)
          diverts the worker onto the wrong (serialized) path
```
The fix changes the barrier at Kernel.cpp:115 from atomic::relaxed to
atomic::acq_rel so that the memory fences are emitted.

Reproducing the problem requires an `if` clause with a non-constant
condition on the target region. The worker's read of HasThreadState
originates from the serialized-region check in __kmpc_parallel_60. When
the `if` condition is constant (or absent), the optimizer can prove that
branch is dead and eliminates the HasThreadState load entirely, so the
race has nothing to observe. A non-constant `if` keeps if_expr, and
hence the LDS read alive, exposing the problem.

I have added a Fortran offload regression test that launches a target
region many times to make the timing-dependent race likely to surface.

Fixes https://github.com/llvm/llvm-project/issues/208698.

Assisted-by: Cursor
2026-07-13 09:57:52 +01:00
Kewen Meng
b2f93b13fe
[OpenMP][Offload] Fix flang offload test (#208829)
This PR attempts to address the remaining flang offload test failure
after https://github.com/llvm/llvm-project/pull/208617. Bot:
https://lab.llvm.org/buildbot/#/builders/67/builds/8412

The problem with is test is that `foo__l8` kernel was not linked into
device image without explicitly use the amdgpu-amd-amdhsa triple in the
compilation. It only happened to this specific test.

Local test results after fix:
```
Testing Time: 146.44s

 Total Discovered Tests: 3478
   Skipped          :   77 (2.21%)
   Unsupported      :  341 (9.80%)
   Passed           : 3055 (87.84%)
   Expectedly Failed:    5 (0.14%)
```
2026-07-11 09:00:38 +02:00
agozillon
7e89dcfba2
[Flang][OpenMP] Support mapping of zero-sized arrays (#208133)
Whilst there is no data in theory to map with a zero sized array, the
Fortran OpenMP specification considers the case of a zero sized array
being mapped to device as the data being present on device. This
includes both the data and the descriptor, and it should fundamentlaly
work as a zero-sized array would on device with the respective Fortran
functions for presence and size checking etc.

We can't actually map a nullptr to device and expect it to be present in
current OpenMP (for good reason), however, thankfully, a zero sized
array isn't actually a nullptr, it is a descriptor contianing an
allocated 1-byte of data. So, we can map this to device, alongside the
descriptor and then the zero sized array is correctlly on device for all
intents and purposes. This case is notably different from a
non-allocated or non-zero sized array so we can do this without shooting
ourselves in the foot.
2026-07-11 01:03:33 +02:00
Kewen Meng
71fe35814f
[OpenMP][Offload][AMDGPU] Fix offload tests failure after the new triple (#208617)
Offload tests failed after introducing the new triple. This PR attempts
to address that. It includes the changes in
https://github.com/llvm/llvm-project/pull/208551. In addition, it also
made following changes:

- Updated flang builder that our buildbot uses;
- Updated the CMakeLists for offload and AMDGPU device runtime (a little
duplications to avoid breaking other buildbots);
- Added per target linker path and mapping for lit substitution/features
in lit config;
- Updated hard-coded check lines in the tests.

This PR reduces the failed offload tests from 246 to 2 on my test runs
locally. Test results and the two failed tests:
```
Failed Tests (2):
   libomptarget :: amdgpu-amd-amdhsa :: offloading/fortran/declare-target-common-block-main.f90
   libomptarget :: amdgpu-amd-amdhsa :: sanitizer/use_after_free_2.c

 Total Discovered Tests: 3478
   Skipped          :   77 (2.21%)
   Unsupported      :  341 (9.80%)
   Passed           : 3053 (87.78%)
   Expectedly Failed:    5 (0.14%)
   Failed           :    2 (0.06%)
```

I was not able to identify the commits for the two failed tests yet
(didn't look like flakiness), will try again later.

Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>
2026-07-10 11:38:16 -07:00
Matt Arsenault
931a00eca6
offload: Match amdgpu triple name in lit config (#208551)
The configured offload system target is now amdgpu-amd-amdhsa since
 d776ee4d4c.
2026-07-10 12:32:54 +02:00
Jan Patrick Lehr
380c581b72
[Offload] Fix warn-unused function (#208642)
Unblock the `-Werror` build in pre-merge by adding a few
[[maybe_unused]] here and there.
2026-07-10 10:14:13 +02:00
Kewen Meng
e2bd9ce693
Revert "[Offload][CI][AMDGPU] Update build scripts for updated triple" (#208583)
Reverts llvm/llvm-project#208568

It breaks bots.
2026-07-09 16:13:05 -07:00
Kewen Meng
9cfa768e63
[Offload][CI][AMDGPU] Update build scripts for updated triple (#208568)
As new triple is introduced
https://github.com/llvm/llvm-project/pull/206480, updated the build
scripts accordingly.
2026-07-09 15:37:13 -07:00
Łukasz Plewa
dd824164c8
[offload] Add olMemPrefetch to liboffload (#206752)
Adds olMemPrefetch and the OL_MEM_MIGRATION_FLAG_* enum, wired through a
new dataPrefetchImpl on the plugin interface with Level Zero and CUDA
implementations. Backends without prefetch support inherit the default
no-op.

Prefetch is a hint that migrates a USM allocation between the host and a
device so subsequent accesses on the target side are faster.

Assisted-by: Claude
2026-07-09 18:08:54 +02:00
Matt Arsenault
d776ee4d4c
offload: Use amdgpu triple name in plugin build (#208455)
The PGO tests expect the produced filename to match the triple.
The tool pulls the triple name from the binary's triple name, and the
RUN lines expect it to match the triple the build was configured with.
2026-07-09 17:34:20 +02:00