Repository navigation
Conversation
6b09af3 to
143c652
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Moderate issues can cause unintended hardware changes, invalid inputs, or silently skipped operations.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Adds five power-management APIs to the Python Sysman binding, including tests, examples, CLI controls, and documentation.
Changes:
- Adds usage, extended-limit, and energy-threshold wrappers.
- Adds unit and black-box coverage.
- Documents the new APIs.
| File | Description |
|---|---|
bindings/sysman/python/test/unit_tests/test_power.py |
Tests the new power API wrappers. |
bindings/sysman/python/source/pyzes.py |
Adds ctypes structures and API wrappers. |
bindings/sysman/python/source/examples/pyzes_black_box_test.py |
Adds runtime checks and setter CLI options. |
bindings/sysman/python/README.md |
Documents the newly supported APIs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Added following power APIs to python binding: 1. zesPowerGetUsage 2. zesPowerGetLimitsExt2 3. zesPowerSetLimitsExt2 4. zesPowerGetEnergyThreshold 5. zesPowerSetEnergyThreshold Along with the zes_energy_threshold_t structure, unit tests, power black box test coverage and README updates. Related-To: SYSM-430 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
…in pyzes black box test
… black box test canControl only reports whether the power limits can be changed, and energy threshold support is reported independently. Check each setter against its own capability, so --set-energy-threshold is not skipped on a domain that supports thresholds but not power limit control. Related-To: SYSM-430 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
91e2721 to
8cd1de4
Compare
zello_sysman sets a power limit with -o --setlimit --global-limit <deviceNo limit>. Replace --set-global-limit DEVICE LIMIT_MW with the same two options so both tools take the same command line; they must be given together. Related-To: SYSM-430 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
Added following power APIs to python binding: 1. zesPowerGetUsage 2. zesPowerGetLimitsExt2 3. zesPowerSetLimitsExt2 4. zesPowerGetEnergyThreshold 5. zesPowerSetEnergyThreshold Along with the zes_energy_threshold_t structure, unit tests, power black box test coverage and README updates. Related-To: SYSM-430 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
| | `zesPowerGetProperties` | Power | 0.1.2 | None | | ||
| | `zesPowerGetLimitsExt` | Power | 0.1.2 | Extended power limits API | | ||
| | `zesPowerSetLimitsExt` | Power | 0.1.2 | Linux: Requires superuser or write permissions for telem nodes | | ||
| | `zesPowerGetUsage` | Power | 0.1.3 | None | |
There was a problem hiding this comment.
this needs super user too no?
There was a problem hiding this comment.
Yes. Thanks or pointing out.
There was a problem hiding this comment.
@aviralni
Please check all the new APIs..
Create a script to verify this by running blackbox test (on the actual machine)
shubskmr
left a comment
There was a problem hiding this comment.
can you please add the jira in the commit message?
are the output attached there?
Done. Yes outputs are attached |
Added following power APIs to python binding: 1. zesPowerGetUsage 2. zesPowerGetLimitsExt2 3. zesPowerSetLimitsExt2 4. zesPowerGetEnergyThreshold 5. zesPowerSetEnergyThreshold Along with the zes_energy_threshold_t structure, unit tests, power black box test coverage and README updates. Related-To: SYSM-430 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
72f0c0c to
9f65461
Compare


feature: Add more power APIs to L0 Sysman python binding
Added following power APIs to python binding:
Related-To: SYSM-430
Signed-off-by: Aviral Nigam aviral.nigam@intel.com