Skip to content

Commit 44e5621

Browse files
authored
added support for new power apis (#435)
* added support for new power apis * fixed version Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
1 parent b518aae commit 44e5621

2 files changed

Lines changed: 60 additions & 3 deletions

File tree

scripts/sysman/power.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#
2-
# Copyright (C) 2019-2022 Intel Corporation
2+
# Copyright (C) 2019-2026 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
66
# See YaML.md for syntax definition
77
#
88
--- #--------------------------------------------------------------------------
99
type: header
10-
desc: "Intel $OneApi Level-Zero Tool APIs for System Resource Management (Sysman) - Scheduler management"
10+
desc: "Intel $OneApi Level-Zero Tool APIs for System Resource Management (Sysman) - Power management"
1111
--- #--------------------------------------------------------------------------
1212
type: enum
1313
desc: "Power Domain"
@@ -355,6 +355,26 @@ returns:
355355
- $X_RESULT_ERROR_NOT_AVAILABLE:
356356
- "Another running process has set the energy threshold."
357357
--- #--------------------------------------------------------------------------
358+
type: function
359+
desc: "Get power usage"
360+
version: "1.16"
361+
class: $sPower
362+
name: GetUsage
363+
details:
364+
- "The application may call this function from simultaneous threads."
365+
- "The implementation of this function should be lock-free."
366+
- "This function returns the different power usage values associated with the power domain."
367+
params:
368+
- type: $s_pwr_handle_t
369+
name: hPower
370+
desc: "[in] Handle of the power domain."
371+
- type: uint32_t*
372+
name: pInstantPower
373+
desc: "[out] Returns the instant power usage in milliwatts."
374+
- type: uint32_t*
375+
name: pAveragePower
376+
desc: "[out] Returns the average power usage in milliwatts."
377+
--- #--------------------------------------------------------------------------
358378
type: class
359379
desc: "C++ wrapper for a Sysman device power domain"
360380
name: $sPower

scripts/sysman/powerLimits.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2021-2022 Intel Corporation
2+
# Copyright (C) 2021-2026 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -123,3 +123,40 @@ returns:
123123
- "User does not have permissions to make these modifications."
124124
- $X_RESULT_ERROR_NOT_AVAILABLE:
125125
- "The device is in use, meaning that the GPU is under Over clocking, applying power limits under overclocking is not supported."
126+
--- #--------------------------------------------------------------------------
127+
type: function
128+
desc: "Get power limits"
129+
version: "1.16"
130+
class: $sPower
131+
name: GetLimitsExt2
132+
details:
133+
- "The application may call this function from simultaneous threads."
134+
- "The implementation of this function should be lock-free."
135+
- "This function returns the power limit associated with the power domain of the handle."
136+
params:
137+
- type: $s_pwr_handle_t
138+
name: hPower
139+
desc: "[in] Power domain handle instance."
140+
- type: uint32_t*
141+
name: pLimit
142+
desc: "[out] Returns limit value in milliwatts for given power domain."
143+
--- #--------------------------------------------------------------------------
144+
type: function
145+
desc: "Set power limits"
146+
version: "1.16"
147+
class: $sPower
148+
name: SetLimitsExt2
149+
details:
150+
- "The application may call this function from simultaneous threads."
151+
- "The implementation of this function should be lock-free."
152+
- "This function sets the power limit associated with the power domain of the handle."
153+
params:
154+
- type: $s_pwr_handle_t
155+
name: hPower
156+
desc: "[in] Power domain handle instance."
157+
- type: "const uint32_t"
158+
name: limit
159+
desc: "[in] Limit value in milliwatts to be set for given power domain."
160+
returns:
161+
- $X_RESULT_ERROR_INSUFFICIENT_PERMISSIONS:
162+
- "User does not have permissions to make these modifications."

0 commit comments

Comments
 (0)