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

Static L0 Loader Support #224

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Oct 25, 2024

Static Loader Support.

This support has a few conditions:

  1. zes/ze driver split is not supported without this version of the loader so backwards compatibility for different lists of drivers for ze/zes init is not supported if using the static lib due to needing to modify the loader's context. zes/ze driver list will be the same.
  2. As of this version of the loader, all symbols read between the static loader and the dynamic loader must remain ABI compatible ie all apis exported in source/loader/ze_loader_api.h now must be abi compatible.
  3. The oldest dynamic loader supported is v1.15.17

Copy link
Contributor

@lisanna-dettwyler lisanna-dettwyler left a comment

Choose a reason for hiding this comment

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

Just a couple small comments from looking at it briefly

source/CMakeLists.txt Outdated Show resolved Hide resolved
source/lib/ze_lib.cpp Outdated Show resolved Hide resolved
@nrspruit nrspruit changed the title [DO_NOT_MERGE] Static L0 Loader Support Static L0 Loader Support Nov 15, 2024
@nrspruit nrspruit requested a review from aravindksg November 15, 2024 19:59
@nrspruit nrspruit force-pushed the static_loader branch 2 times, most recently from 62860db to 0397704 Compare November 15, 2024 21:40
@ilya-lavrenov
Copy link
Contributor

Issue #141

Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
- Added support for older dii tables such that the version of the apis
  supported by that dynamic loader are requested and not newer versions.
- Added check for backwards compatability for older init apis.

Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
Signed-off-by: Neil R. Spruit <[email protected]>
@nrspruit nrspruit marked this pull request as ready for review January 27, 2025 22:10
@@ -34,22 +36,130 @@ namespace ze_lib
context_t();
~context_t();

//////////////////////////////////////////////////////////////////////////
std::string to_string(const ze_result_t result) {
Copy link
Contributor

@rwmcguir rwmcguir Jan 29, 2025

Choose a reason for hiding this comment

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

is this coming from build time, else we have a maintenance nightmare?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is manual, we have no mako for this file right now.

@@ -34,22 +36,130 @@ namespace ze_lib
context_t();
~context_t();

//////////////////////////////////////////////////////////////////////////
std::string to_string(const ze_result_t result) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This work, but have you considered using stringify w/preprocessor macros?
Which may also work to not miss future ZE_RESULT additions

Trying to avoid a future maintenance issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The generation of this code, which exists elsewhere, will be addressed in a separate PR.

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.

4 participants