Skip to content

Commit 9086388

Browse files
committed
feature: Add support for sysman python bindings
Related-To: NEO-NEO-17257 Signed-off-by: shubham kumar <shubham.kumar@intel.com>
1 parent 3ef4c34 commit 9086388

13 files changed

Lines changed: 78 additions & 10 deletions

File tree

bindings/sysman/python/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,17 @@ Notes:
203203

204204
zesDeviceEnumEngineGroups shows no handles found error when not in super user mode.
205205

206-
COPYRIGHT
207-
---------
208-
Copyright (c) 2025, INTEL Corporation. All rights reserved.
206+
# Contributing
207+
208+
See [CONTRIBUTING](CONTRIBUTING.md) for more information.
209+
210+
# License
211+
212+
Distributed under the MIT license. See [LICENSE](LICENSE) for more information.
213+
214+
# Security
215+
216+
See Intel's [Security Center](https://www.intel.com/content/www/us/en/security-center/default.html) for information on how to report a potential security issue or vulnerability.
217+
218+
See also [SECURITY](SECURITY.md).
219+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# pyzes Examples
2+
3+
This directory contains example scripts demonstrating how to use the pyzes module.
4+
5+
**IMPORTANT:** The usage instructions below apply to pyzes installed via pip. If you've cloned this repository locally, you should run the examples directly from the `test/` directory in the repository root instead.
6+
7+
## Using Examples After Installation
8+
9+
**These instructions are for users who installed pyzes via pip:**
10+
11+
After installing pyzes via pip:
12+
```bash
13+
pip install pyzes
14+
```
15+
16+
You can run examples directly:
17+
```bash
18+
python3 -m examples.pyzes_example
19+
python3 -m examples.pyzes_black_box_test -h
20+
```
21+
22+
---
23+
24+
## If You Cloned the Repository
25+
26+
If you cloned the level-zero repository locally, run the examples directly from the repository:
27+
28+
```bash
29+
cd bindings/sysman/python/source/examples
30+
python3 pyzes_example.py
31+
python3 pyzes_black_box_test.py -h
32+
```
33+
34+
The examples in this `source/examples/` directory are packaged for pip distribution only.
35+
36+
---
37+
38+
## Requirements
39+
40+
- Python 3.10+
41+
- Intel GPU with Level-Zero drivers installed
42+
- pyzes module
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
Example scripts demonstrating pyzes usage.
3+
4+
These examples show how to use the pyzes module for Intel Level-Zero System Management.
5+
"""
6+
7+
__version__ = "0.1.0"

bindings/sysman/python/test/pyzes_black_box_test.py renamed to bindings/sysman/python/source/examples/pyzes_black_box_test.py

File renamed without changes.

bindings/sysman/python/test/pyzes_example.py renamed to bindings/sysman/python/source/examples/pyzes_example.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#!/usr/bin/env python3
2+
##
3+
# Copyright (C) 2025 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
##
8+
19
"""
210
Run:
311
python pyzes_example.py

bindings/sysman/python/test/unit_tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
##
2+
# Copyright (C) 2025 Intel Corporation
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
##
7+
18
"""
29
Pytest configuration for unit tests with GPU library mocking.
310
Unit tests should always use mocked GPU libraries to test logic in isolation.

bindings/sysman/python/test/unit_tests/test_engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
##
32
# Copyright (C) 2025 Intel Corporation
43
#

bindings/sysman/python/test/unit_tests/test_frequency.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
##
32
# Copyright (C) 2025 Intel Corporation
43
#

bindings/sysman/python/test/unit_tests/test_global_operations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
##
32
# Copyright (C) 2025 Intel Corporation
43
#

bindings/sysman/python/test/unit_tests/test_init.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
##
32
# Copyright (C) 2025 Intel Corporation
43
#

0 commit comments

Comments
 (0)