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

[L0] Use zesInit for SysMan API usage #2017

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

nrspruit
Copy link
Contributor

@nrspruit nrspruit commented Aug 28, 2024

  • Change to using zesInit and zes data structures for accessing L0
    SysMan functionality.
  • Updated Platform & Devices to store zes handles if sysman support is
    available.
  • Given Legacy Environment Variable from user, then fallback to
    old functionality.
  • Fixed Return code on error to be consistently unsupported enumeration.

@github-actions github-actions bot added the level-zero L0 adapter specific issues label Aug 28, 2024
@nrspruit nrspruit force-pushed the new_sysman_init branch 3 times, most recently from 6286b42 to 20db286 Compare August 28, 2024 00:43
@nrspruit nrspruit force-pushed the new_sysman_init branch 3 times, most recently from b8dc1db to e90d664 Compare September 2, 2024 23:01
- Change to using zesInit and zes data structures for accessing L0
  SysMan functionality.
- Updated Platform & Devices to store zes handles if sysman support is
  available.
- Given Legacy Environment Variable from user, then fallback to
  old functionality.
- Fixed Return code on error to be consistently unsupported enumeration.

Signed-off-by: Neil R. Spruit <[email protected]>
- To enable backwards compatability with older L0 Loaders, dynamic load
  of the zes separate init symbols along with the EXP Device UUID lookup
symbol has been added during adapter init.

Signed-off-by: Neil R. Spruit <[email protected]>
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 17, 2024
@nrspruit nrspruit marked this pull request as ready for review September 17, 2024 13:58
@nrspruit nrspruit requested a review from a team as a code owner September 17, 2024 13:58
@nrspruit
Copy link
Contributor Author

Hello @pbalcer , please take a look, this reuses the ur loader functions for the function pointer retrieval. See if you disagree with their reuse or if you are fine with this change.

source/adapters/level_zero/adapter.cpp Outdated Show resolved Hide resolved
source/adapters/level_zero/adapter.cpp Show resolved Hide resolved
source/adapters/level_zero/device.cpp Outdated Show resolved Hide resolved
source/adapters/level_zero/adapter.cpp Outdated Show resolved Hide resolved
source/adapters/level_zero/adapter.cpp Show resolved Hide resolved
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

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

lgtm for the most part, but much of this is dead code, especially the zes initialization. Can you please add a test that exercises this code path to make sure the loading of the loader symbol works? (do we have a new enough driver in the CI?)

nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to intel/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
@nrspruit nrspruit requested a review from a team as a code owner September 18, 2024 17:51
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 18, 2024
nrspruit added a commit to intel/llvm that referenced this pull request Sep 18, 2024
@github-actions github-actions bot added the conformance Conformance test suite issues. label Sep 18, 2024
#ifdef _WIN32
HMODULE processHandle = GetModuleHandle(NULL);
#else
HMODULE processHandle = nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this will work, but should technically be RTLD_DEFAULT (which is NULL anyway, but... :P)

@nrspruit nrspruit added the ready to merge Added to PR's which are ready to merge label Sep 23, 2024
@aarongreig aarongreig merged commit 2296205 into oneapi-src:main Sep 27, 2024
77 checks passed
nrspruit added a commit to nrspruit/llvm that referenced this pull request Sep 27, 2024
martygrant pushed a commit to intel/llvm that referenced this pull request Sep 30, 2024
-pre-commit PR for
oneapi-src/unified-runtime#2017

---------

Signed-off-by: Neil R. Spruit <[email protected]>
Co-authored-by: Artur Gainullin <[email protected]>
@nrspruit nrspruit added the v0.10.x Include in the v0.10.x release label Sep 30, 2024
kbenzie pushed a commit that referenced this pull request Oct 1, 2024
[L0] Use zesInit for SysMan API usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Conformance test suite issues. level-zero L0 adapter specific issues ready to merge Added to PR's which are ready to merge v0.10.x Include in the v0.10.x release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants