Skip to content
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

Add support for static linking of the L0 adapter #1820

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

pbalcer
Copy link
Contributor

@pbalcer pbalcer commented Jul 4, 2024

This patch adds a build-time option that builds the L0 adapter
as a static library and then embeds its in the loader.
The mechanim itself is fairly generic and, when a need arises,
the same can be done for other adapters.

@pbalcer pbalcer requested review from a team as code owners July 4, 2024 12:49
@github-actions github-actions bot added ci/cd Continuous integration/devliery loader Loader related feature/bug images UR images level-zero L0 adapter specific issues command-buffer Command Buffer feature addition/changes/specification labels Jul 4, 2024
@pbalcer pbalcer force-pushed the static-linking branch 2 times, most recently from e552c50 to 38ac63a Compare July 5, 2024 09:40
Copy link
Contributor

@isaacault isaacault left a comment

Choose a reason for hiding this comment

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

Bindless Images changes LGTM.

@pbalcer
Copy link
Contributor Author

pbalcer commented Jul 9, 2024

@nrspruit can you please take a look?

@pbalcer
Copy link
Contributor Author

pbalcer commented Jul 11, 2024

@oneapi-src/unified-runtime-level-zero-write @oneapi-src/unified-runtime-maintain This is a nightmare to rebase (I'm not doing it again until I have a full set of approvals :-)), I'd appreciate a prompt review.

Copy link
Contributor

@nrspruit nrspruit left a comment

Choose a reason for hiding this comment

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

LGTM

@pbalcer pbalcer force-pushed the static-linking branch 3 times, most recently from d3ab0df to 1c95ae4 Compare July 15, 2024 09:28
@pbalcer
Copy link
Contributor Author

pbalcer commented Jul 15, 2024

intel/llvm build is failing with pi_level_zero.cpp:(.text.piextPlatformGetNativeHandle+0x32): undefined reference to 'urPlatformGetNativeHandle'. I'm not sure whether changing the PI layer right now is worth it, so I'm going to wait with this patch until that layer is removed.

@pbalcer pbalcer added the v0.10.x Include in the v0.10.x release label Jul 24, 2024
@alycm alycm removed the v0.10.x Include in the v0.10.x release label Jul 29, 2024
@kswiecicki kswiecicki force-pushed the static-linking branch 8 times, most recently from 1c4d81b to 8939cfe Compare August 28, 2024 11:13
@kswiecicki kswiecicki force-pushed the static-linking branch 6 times, most recently from 7d8c910 to 2775137 Compare August 30, 2024 10:51
@github-actions github-actions bot added the conformance Conformance test suite issues. label Aug 30, 2024
@kswiecicki kswiecicki force-pushed the static-linking branch 11 times, most recently from 62b168d to e156b61 Compare September 6, 2024 12:34
pbalcer and others added 2 commits September 6, 2024 13:12
This patch adds a cmake option that builds the L0 adapter
as a static library and then embeds its in the loader.
The mechanim itself is fairly generic and, when a need arises,
the same can be done for other adapters.
This option, marked as PUBLIC, is propagated to the targets linked with the
'ur_adapter_level_zero' target when the Level Zero adapter is built as a static
library. This led to a STATUS_DLL_NOT_FOUND error when running test binaries
on Windows.
@pbalcer pbalcer merged commit 8c9dd7e into oneapi-src:main Sep 6, 2024
72 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Continuous integration/devliery command-buffer Command Buffer feature addition/changes/specification common Changes or additions to common utilities conformance Conformance test suite issues. images UR images level-zero L0 adapter specific issues loader Loader related feature/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants