Skip to content

add support for sysman 1.21 apis - #564

Open
joshuaranjan wants to merge 1 commit into
oneapi-src:masterfrom
joshuaranjan:add_new_pyzes_api_support
Open

joshuaranjan wants to merge 1 commit into
oneapi-src:masterfrom
joshuaranjan:add_new_pyzes_api_support

Conversation

@joshuaranjan

Copy link
Copy Markdown

Add support for

  1. Sysman API version
  2. Driver PCI properties
  3. GPU topology

Signed-off-by: Ranjan, Joshua Santhosh <joshua.santosh.ranjan@intel.com>
@github-actions

Copy link
Copy Markdown

Level Zero loader ABI check

last-release (v1.36.0): ✅ no ABI problems. Report

Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0

master (master): ✅ no ABI problems. Report

Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0

Workflow run

If an ABI change is intended, a reviewer with write access can accept it: leave an approval review on the PR head commit with the keyword abi-failure-approved in the review body. That re-runs the check.

@rwmcguir rwmcguir left a comment •

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.

The SONAME major is derived from ZES_API_VERSION_CURRENT, but those are independent. The loader SOVERSION comes from the loader project major (source/CMakeLists.txt:46, from project() in CMakeLists.txt:16), and there is no contract that it stays in sync with the Sysman API major, i.e. per semver the loader could go to 2.0 and still support zes 1.x. Please use a separate constant for the loader major, e.g. _ZE_LOADER_SOVERSION = 1, and don't tie it to the API version.

Also, I am not seeing any automation for these values, pyzes is manually maintained while the spec import regenerates zes_api.h and , so they can silently go stale... Though uncertain since pyzes is allowed to lag since it is packaged and released separately. See the other comment for ideas.

The data structure that contains all the version, we could make common perhaps, or you can maintain it separately, but as in my other comment it will be the third copy. However, I would still keep your OWN copy of the ...VERSION_CURRENT... as that is the version your tied to for compatibility.. i.e. somehow you need to know that the bindings are written to match a specific API version, so it shouldn't auto-inherit that.. i.e. perhaps ZES_BINDINGS_VERSION_CURRENT or something. That should be the one manual update taht takes place, unless the entire generatkion of pyzes becomes automatically synced with Spec releases.

The concept would be Ensure your _ZE_LOADER_SOVERSION is matched against actual SOVERSION declared in Cmakefile during your CI run. Then additional if you don't automate the ZES_BINDINGS_VERSION_CURRENT and you want to leave it manual, then you could check that version against zes_api.h declared version as well. CI would kick you back an error letting you know it was out of sync or no longer compatible. This second check could tighten your compatibility down to the MINOR version i.e. [(zes_api.h MAJ.MIN) >= (pyzes MAJ.MIN)]

This test case would only run in your workflow for sysman bindings, it would not be part of the normal CI flow for loader only updates., Since we don't want to block L0 Loader updates with pyzes lagging.

Comment on lines +73 to +97
zes_api_version_t = c_int32
ZES_API_VERSION_1_0 = ZES_MAKE_VERSION(1, 0)
ZES_API_VERSION_1_1 = ZES_MAKE_VERSION(1, 1)
ZES_API_VERSION_1_2 = ZES_MAKE_VERSION(1, 2)
ZES_API_VERSION_1_3 = ZES_MAKE_VERSION(1, 3)
ZES_API_VERSION_1_4 = ZES_MAKE_VERSION(1, 4)
ZES_API_VERSION_1_5 = ZES_MAKE_VERSION(1, 5)
ZES_API_VERSION_1_6 = ZES_MAKE_VERSION(1, 6)
ZES_API_VERSION_1_7 = ZES_MAKE_VERSION(1, 7)
ZES_API_VERSION_1_8 = ZES_MAKE_VERSION(1, 8)
ZES_API_VERSION_1_9 = ZES_MAKE_VERSION(1, 9)
ZES_API_VERSION_1_10 = ZES_MAKE_VERSION(1, 10)
ZES_API_VERSION_1_11 = ZES_MAKE_VERSION(1, 11)
ZES_API_VERSION_1_12 = ZES_MAKE_VERSION(1, 12)
ZES_API_VERSION_1_13 = ZES_MAKE_VERSION(1, 13)
ZES_API_VERSION_1_14 = ZES_MAKE_VERSION(1, 14)
ZES_API_VERSION_1_15 = ZES_MAKE_VERSION(1, 15)
ZES_API_VERSION_1_16 = ZES_MAKE_VERSION(1, 16)
ZES_API_VERSION_1_17 = ZES_MAKE_VERSION(1, 17)
ZES_API_VERSION_1_18 = ZES_MAKE_VERSION(1, 18)
ZES_API_VERSION_1_19 = ZES_MAKE_VERSION(1, 19)
ZES_API_VERSION_1_20 = ZES_MAKE_VERSION(1, 20)
ZES_API_VERSION_1_21 = ZES_MAKE_VERSION(1, 21)
ZES_API_VERSION_CURRENT = ZES_MAKE_VERSION(1, 21)
ZES_API_VERSION_FORCE_UINT32 = 0x7FFFFFFF

@rwmcguir rwmcguir Nov 21, 2026 •

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.

The spec today auto-updates include/zes_api.h already and it also updates /include/zes.py with this content.
Would make sense to construct something that makes a chunk of common code that creates this for you? Though we'd want to operate as part of your release update process and not the primary C++ L0 Loader workflow? This will be an immediate manual update problem. Else this will be a third duplicate and this copy will have to be manually maintained... Read the other commentary and see if we can tie these two thoughts together... The tricky part I see is that we have a L0 Loader and ZES_API_VERSION in the C/C++ binaries but it is likely and possibly after every L0 Loader release it will be different than what is in pyzes. It would make sense for your creation code to automate editing this file, but it needs to run only when you update pyzes and not at spec creation time.. Unless somehow we went full automation and pyzes was fully updated when the Spec publishes? Then both could be at the same time. Either solution works to keep things working.

This branch has not been deployed

No deployments
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