UR Offload: align enqueue calls with updated OffloadAPI signatures#22125
Draft
Copilot wants to merge 7 commits into
Draft
UR Offload: align enqueue calls with updated OffloadAPI signatures#22125Copilot wants to merge 7 commits into
Copilot wants to merge 7 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Adapters (Offload) / Build (Release, gcc, g++)
Fix offload adapter link path resolution for multiarch LLVMOffload installs
May 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes ur_adapter_offload link-time failures when consuming a prebuilt LLVM Offload install whose libraries are placed under multiarch lib directories (e.g., lib/x86_64-unknown-linux-gnu) instead of a flat ${prefix}/lib layout.
Changes:
- Replaces a hardcoded
${UR_OFFLOAD_INSTALL_DIR}/lib/libLLVMOffload.solink with a resolvedUR_OFFLOAD_LLVMOFFLOAD_LIBRARYpath. - Adds CMake logic to locate
libLLVMOffloadviafind_library()with common libdir suffixes, plus a glob fallback for nested multiarch layouts. - Emits a fatal configure error if
libLLVMOffloadcannot be found.
Comment on lines
+137
to
+149
| if(UR_OFFLOAD_BUILD_FROM_SOURCE) | ||
| set(UR_OFFLOAD_LLVMOFFLOAD_LIBRARY | ||
| "${UR_OFFLOAD_INSTALL_DIR}/lib/libLLVMOffload${CMAKE_SHARED_LIBRARY_SUFFIX}") | ||
| else() | ||
| find_library(UR_OFFLOAD_LLVMOFFLOAD_LIBRARY | ||
| NAMES LLVMOffload | ||
| HINTS "${UR_OFFLOAD_INSTALL_DIR}" | ||
| PATH_SUFFIXES | ||
| "${CMAKE_INSTALL_LIBDIR}" | ||
| lib | ||
| lib64 | ||
| NO_DEFAULT_PATH | ||
| ) |
Comment on lines
+155
to
+158
| if(UR_OFFLOAD_LLVMOFFLOAD_LIBRARY_CANDIDATES) | ||
| list(SORT UR_OFFLOAD_LLVMOFFLOAD_LIBRARY_CANDIDATES) | ||
| list(GET UR_OFFLOAD_LLVMOFFLOAD_LIBRARY_CANDIDATES 0 UR_OFFLOAD_LLVMOFFLOAD_LIBRARY) | ||
| endif() |
Copilot
AI
changed the title
Fix offload adapter link path resolution for multiarch LLVMOffload installs
UR Offload: align enqueue calls with updated OffloadAPI signatures
May 27, 2026
Contributor
|
@lplewa please review if this fix makes sense (or if we can close this PR) |
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
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.
The Offload job in UR precommit regressed due to API drift between the offload adapter and the current
OffloadAPI.hfunction signatures. The adapter still used old call forms for event creation and kernel launch, causing compile-time argument mismatch errors.What changed
olCreateEventcall sites updated: pass explicit event flags at all enqueue/event creation paths inenqueue.cpp.olLaunchKernelcall updated: pass the new launch-properties argument (nullptrfor current behavior) to match the extended signature.Why this resolves the CI failure