-
Notifications
You must be signed in to change notification settings - Fork 769
[UR][Offload] Add initial Offload adapter #18271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
callumfare
wants to merge
11
commits into
intel:sycl
Choose a base branch
from
callumfare:offload_adapter
base: sycl
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes the dependency on cudadrv optional and ifdefs away the cubin workaround if it isn't. This isn't sufficient to have HIP devices compile kernels, but does allow libur_adapter_offload to be built on said hosts. In addition, an unused variable error was fixed.
This adds "offload" to several locations, meaning that: * It will be initialised by the loader and iterated like other adapters. * ONEAPI_DEVICE_SELECTOR="offload:*" works (note that this is an extension to the ONEAPI_DEVICE_SELECTOR format). * Platforms and adapters now report themselves as "OFFLOAD" rather than "CUDA" or "HIP".
It is non-trivial which binary format (spir, ptx, amdhsa) is accepted by a given offload device. This should be fixed properly in the future, but for now let the user specify it via an environment variable.
SYCL and the UR CTS produce HIP "offload bundles" when compiling for AMDGPU, which cannot be accepted by the basic AMD offload plugin. This change adds a simple offload bundle parser which extracts the appropriate binary from the bundle, allowing it to be fed to liboffload.
2278ccd
to
b7c161d
Compare
b7c161d
to
1fe1406
Compare
1fe1406
to
3794a92
Compare
kbenzie
reviewed
May 1, 2025
1c25c33
to
489d3b8
Compare
489d3b8
to
b42db9e
Compare
Looks like the PVC E2E job was hanging (took more than 4h) https://github.com/intel/llvm/actions/runs/14776311985/job/41486266686?pr=18271, cancelled and re-triggered it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the initial implementation of the Offload adapter for UR.
The adapter targets the new liboffload library in LLVM.
The adapter is experimental and is currently only maintained to drive development of liboffload by identifying and closing gaps with UR.