Skip to content

[UR] statically link ur loader with sycl by default#22031

Open
pbalcer wants to merge 6 commits into
intel:syclfrom
pbalcer:static-link-loader-default
Open

[UR] statically link ur loader with sycl by default#22031
pbalcer wants to merge 6 commits into
intel:syclfrom
pbalcer:static-link-loader-default

Conversation

@pbalcer
Copy link
Copy Markdown
Contributor

@pbalcer pbalcer commented May 15, 2026

This patch enables UR static linking with libsycl, and also makes a change to the adapter discovery logic so that it searches for adapter libraries first in the canonical path of the loader/sycl executable. This enables UR loader, in applications that use RPATH, to properly find the adapter files, even when multiple different versions of UR are present in ld search directories.

@pbalcer pbalcer requested a review from a team as a code owner May 15, 2026 08:21
@pbalcer pbalcer force-pushed the static-link-loader-default branch 3 times, most recently from 47a50a8 to 9c08b4c Compare May 15, 2026 11:16
@pbalcer pbalcer requested a review from a team as a code owner May 15, 2026 14:48
@pbalcer pbalcer requested a review from slawekptak May 15, 2026 14:48
@pbalcer pbalcer force-pushed the static-link-loader-default branch 6 times, most recently from 4e0e2cd to 8260659 Compare May 18, 2026 07:52
pbalcer added 5 commits May 18, 2026 08:53
SYCL already does XPTI initialization and teardown, doing it twice
when statically linking leads to double free.
Instead of __attribute__((weak)) on the SymbolizeCode function,
which fails to resolve at runtime when using static linking.
Copy link
Copy Markdown
Contributor

@kswiecicki kswiecicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we could document the new option in README.md.

set(_sycl_ur_loader UnifiedRuntimeLoaderDebug)
elseif(NOT WIN32 OR UR_STATIC_LOADER)
set(_sycl_ur_loader UnifiedRuntimeLoader)
else()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a comment which conditions fall into else?

@pbalcer pbalcer force-pushed the static-link-loader-default branch from 8260659 to 45ef3f8 Compare May 18, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants