Skip to content

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Jul 18, 2025

Automated changes by create-pull-request GitHub action

RossBrunton and others added 9 commits July 18, 2025 00:44
Offload consumes both IL and binaries through the same entrypoint, so
there's no point in drawing a distinction.
- Fix issue where updating multiple nodes with the same UR kernel handle
would give incorrect results due to arg caching.
- Add SYCL E2E test based on the example in the issue that reported
this.

Addresses issue reported in #19450
This patch mostly just adds some more documentation in the stream queue
implementation, but it also does a few other things:

* Re-order members in more coherent groups.
* Use `ur_<object>_t` instead of `ur_<object>_t_ *`, they are identical
but the first one is nicer.
* Remove unused `get()` member function.
In L0 we need to call
[zeVirtualMemQueryPageSize](https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/api.html#ze__api_8h_1afe411cceb631a3a176463ee05fda3dd7)
with the actual allocation size for the virtual/physical allocations to
align correctly.

Right now we check alignment without passing any size:
https://github.com/intel/llvm/blob/sycl/sycl/source/detail/graph/memory_pool.cpp#L45

This ends up translating to 1 byte in the call to L0:
https://github.com/oneapi-src/unified-runtime/blob/de05f984aa19458a4993d2a2709e3b79d82f1a37/source/adapters/level_zero/virtual_mem.cpp#L32-L37
and for large allocations a wrong alignment is used and L0 reports
ZE_RESULT_ERROR_UNSUPPORTED_SIZE upon zePhysicalMemCreate call (UR fails
with UR_RESULT_ERROR_INVALID_VALUE then).

The UR API should change to accept a size.

This PR exposes this issue in a unittest and fixes it.
- catch potential exception in ~ur_exp_command_buffer_handle_t_
- move ZeUSMImport definition to adapter.cpp:
  ZeUSMImport is used by global adapter constructor (on Windows).
  It needs to be initialized before the global adapter.

  According to Coverity:
  The constructor of global object "GlobalAdapter" itself makes use
  of global object "ZeUSMImport" defined in another compilation unit.
  The order of construction is unspecified, so "GlobalAdapter" might
  be created before "ZeUSMImport" is available.
L0v2 adapter was marked as unsupported in some async alloc tests due to
missing features.

Those tests were failing because of the missing functions:
`urUSMPoolGetInfoExp`, `urUSMPoolSetInfoExp`, `urUSMPoolCreateExp`,
`urUSMPoolDestroyExp`, `urUSMPoolGetDefaultDevicePoolExp`.
Closes #18488
Enable the Offload backend in the E2E tests. The Offload UR adapter is
still experimental and a WIP, the purpose of E2E testing now is purely
to help develop the adapter and liboffload itself. The Offload adapter
is not built by default.
@kbenzie kbenzie requested a review from a team as a code owner July 18, 2025 00:44
Copy link
Contributor

Unified Runtime -> intel/llvm Repo Move Notice

Information

The source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory,
all future development will now be carried out there. This was done in intel/llvm#17043.

The code will be mirrored to oneapi-src/unified-runtime and the specification will continue to be hosted at oneapi-src.github.io/unified-runtime.

The contribution guide will be updated with new instructions for contributing to Unified Runtime.

PR Migration

All open PRs including this one will be marked with the auto-close label and shall be automatically closed after 30 days.

Should you wish to continue with your PR you will need to migrate it to intel/llvm.
We have provided a script to help automate this process.

If your PR should remain open and not be closed automatically, you can remove the auto-close label.


This is an automated comment.

@kbenzie kbenzie merged commit 6df105a into main Jul 18, 2025
@kbenzie kbenzie deleted the mirror-commits- branch July 18, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants