habana-pyhlml 1.21.4.3__py3-none-any.whl → 1.22.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of habana-pyhlml might be problematic. Click here for more details.
- META-INF/HABANA_PYHLML-1.22.1.6-PY3-NONE-ANY.RSA +0 -0
- META-INF/HABANA_PYHLML-1.22.1.6-PY3-NONE-ANY.SF +38 -0
- META-INF/MANIFEST.MF +36 -0
- {habana_pyhlml-1.21.4.3.dist-info → habana_pyhlml-1.22.1.6.dist-info}/METADATA +1 -1
- habana_pyhlml-1.22.1.6.dist-info/RECORD +11 -0
- pyhlml/hlml_types.py +115 -146
- pyhlml/main.py +378 -411
- pyhlml/pyhlml_types_generated.py +268 -0
- habana_pyhlml-1.21.4.3.dist-info/RECORD +0 -10
- {habana_pyhlml-1.21.4.3.dist-info → habana_pyhlml-1.22.1.6.dist-info}/LICENSE +0 -0
- {habana_pyhlml-1.21.4.3.dist-info → habana_pyhlml-1.22.1.6.dist-info}/WHEEL +0 -0
- {habana_pyhlml-1.21.4.3.dist-info → habana_pyhlml-1.22.1.6.dist-info}/top_level.txt +0 -0
pyhlml/main.py
CHANGED
|
@@ -11,29 +11,18 @@ from pyhlml.hlml_error import HLMLError, ErrorsAsClass
|
|
|
11
11
|
_hlmlOBJ = None
|
|
12
12
|
|
|
13
13
|
def _wrapperInit():
|
|
14
|
-
"""
|
|
15
|
-
Parameters: None
|
|
16
|
-
Returns: None
|
|
17
|
-
"""
|
|
14
|
+
"""Initialize module-level HLML object and error classes."""
|
|
18
15
|
ErrorsAsClass()
|
|
19
16
|
setattr(modules[__name__], "_hlmlOBJ", LibHLML())
|
|
20
17
|
|
|
21
18
|
def check_return(ret):
|
|
22
|
-
"""
|
|
23
|
-
Parameters:
|
|
24
|
-
ret - Symbol for checking if return was valid.
|
|
25
|
-
Returns:
|
|
26
|
-
ret - Symbol for current error status.
|
|
27
|
-
"""
|
|
19
|
+
"""Raise HLMLError if ret is not HLML_SUCCESS, otherwise return ret."""
|
|
28
20
|
if (ret != hlml_t.HLML_RETURN.HLML_SUCCESS ):
|
|
29
21
|
raise HLMLError(ret)
|
|
30
22
|
return ret
|
|
31
23
|
|
|
32
24
|
def hlmlInit() -> None:
|
|
33
|
-
""" Must be called before any other
|
|
34
|
-
Parameters: None
|
|
35
|
-
Returns: None
|
|
36
|
-
"""
|
|
25
|
+
"""Initialize HLML. Must be called before any other API can be used."""
|
|
37
26
|
_wrapperInit()
|
|
38
27
|
global _hlmlOBJ
|
|
39
28
|
|
|
@@ -45,10 +34,9 @@ def hlmlInit() -> None:
|
|
|
45
34
|
return None
|
|
46
35
|
|
|
47
36
|
def hlmlInitWithFlags(flags=0) -> None:
|
|
48
|
-
"""
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Returns: None
|
|
37
|
+
"""Initialize HLML with flags. Only the default flag (0) is supported.
|
|
38
|
+
Args:
|
|
39
|
+
flags (int): Initialization flags (default 0).
|
|
52
40
|
"""
|
|
53
41
|
_wrapperInit()
|
|
54
42
|
global _hlmlOBJ
|
|
@@ -61,10 +49,7 @@ def hlmlInitWithFlags(flags=0) -> None:
|
|
|
61
49
|
return None
|
|
62
50
|
|
|
63
51
|
def hlmlShutdown() -> None:
|
|
64
|
-
"""
|
|
65
|
-
Parameters: None
|
|
66
|
-
Returns: None
|
|
67
|
-
"""
|
|
52
|
+
"""Shutdown HLML and release resources. Should be called last."""
|
|
68
53
|
global _hlmlOBJ
|
|
69
54
|
|
|
70
55
|
fn = _hlmlOBJ.get_func_ptr("hlml_shutdown")
|
|
@@ -76,11 +61,9 @@ def hlmlShutdown() -> None:
|
|
|
76
61
|
return None
|
|
77
62
|
|
|
78
63
|
def hlmlDeviceGetCount() -> int:
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
count (int) - Number of habana devices.
|
|
83
|
-
Ex. An HLS1-H would return 4
|
|
64
|
+
"""Get the number of Habana devices in the system.
|
|
65
|
+
Returns:
|
|
66
|
+
int: Number of Habana devices.
|
|
84
67
|
"""
|
|
85
68
|
global _hlmlOBJ
|
|
86
69
|
count = ctypes.c_uint()
|
|
@@ -92,11 +75,13 @@ def hlmlDeviceGetCount() -> int:
|
|
|
92
75
|
return count.value
|
|
93
76
|
|
|
94
77
|
def hlmlDeviceGetHandleByPCIBusID(pci_addr: str) -> hlml_t.HLML_DEVICE.TYPE:
|
|
95
|
-
"""
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
78
|
+
"""Get device handle by PCI address.
|
|
79
|
+
If there is a single domain, the 'domain' part of the PCI address
|
|
80
|
+
is not required.
|
|
81
|
+
Args:
|
|
82
|
+
pci_addr (str): PCI address of the device.
|
|
83
|
+
Returns:
|
|
84
|
+
HLML_DEVICE.TYPE: Device handle.
|
|
100
85
|
"""
|
|
101
86
|
global _hlmlOBJ
|
|
102
87
|
|
|
@@ -108,11 +93,11 @@ def hlmlDeviceGetHandleByPCIBusID(pci_addr: str) -> hlml_t.HLML_DEVICE.TYPE:
|
|
|
108
93
|
return device
|
|
109
94
|
|
|
110
95
|
def hlmlDeviceGetHandleByIndex(index: int) -> hlml_t.HLML_DEVICE.TYPE:
|
|
111
|
-
"""
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
96
|
+
"""Get device handle by index.
|
|
97
|
+
Args:
|
|
98
|
+
index (int): Device index.
|
|
99
|
+
Returns:
|
|
100
|
+
HLML_DEVICE.TYPE: Device handle.
|
|
116
101
|
"""
|
|
117
102
|
global _hlmlOBJ
|
|
118
103
|
device = hlml_t.HLML_DEVICE.TYPE()
|
|
@@ -124,11 +109,11 @@ def hlmlDeviceGetHandleByIndex(index: int) -> hlml_t.HLML_DEVICE.TYPE:
|
|
|
124
109
|
return device
|
|
125
110
|
|
|
126
111
|
def hlmlDeviceGetHandleByUUID(uuid: str) -> hlml_t.HLML_DEVICE.TYPE:
|
|
127
|
-
"""
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
112
|
+
"""Get device handle by UUID (Universal Unique ID).
|
|
113
|
+
Args:
|
|
114
|
+
uuid (str): Device UUID.
|
|
115
|
+
Returns:
|
|
116
|
+
HLML_DEVICE.TYPE: Device handle.
|
|
132
117
|
"""
|
|
133
118
|
global _hlmlOBJ
|
|
134
119
|
device = hlml_t.HLML_DEVICE.TYPE()
|
|
@@ -139,12 +124,12 @@ def hlmlDeviceGetHandleByUUID(uuid: str) -> hlml_t.HLML_DEVICE.TYPE:
|
|
|
139
124
|
check_return(ret)
|
|
140
125
|
return device
|
|
141
126
|
|
|
142
|
-
def hlmlDeviceGetName(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
143
|
-
"""
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
127
|
+
def hlmlDeviceGetName(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
128
|
+
"""Get device name from handle.
|
|
129
|
+
Args:
|
|
130
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
131
|
+
Returns:
|
|
132
|
+
bytes: Device name.
|
|
148
133
|
"""
|
|
149
134
|
global _hlmlOBJ
|
|
150
135
|
name = ctypes.create_string_buffer(hlml_t.HLML_DEFINE.HL_FIELD_MAX_SIZE)
|
|
@@ -159,11 +144,11 @@ def hlmlDeviceGetName(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
159
144
|
return name.value
|
|
160
145
|
|
|
161
146
|
def hlmlDeviceGetPCIInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_pci_info:
|
|
162
|
-
"""
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
147
|
+
"""Get PCI attributes of the device.
|
|
148
|
+
Args:
|
|
149
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
150
|
+
Returns:
|
|
151
|
+
c_hlml_pci_info: PCI attributes.
|
|
167
152
|
"""
|
|
168
153
|
global _hlmlOBJ
|
|
169
154
|
pci_info = hlml_t.c_hlml_pci_info()
|
|
@@ -178,12 +163,12 @@ def hlmlDeviceGetPCIInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_pci_i
|
|
|
178
163
|
return pci_info
|
|
179
164
|
|
|
180
165
|
def hlmlDeviceGetClockInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) -> int:
|
|
181
|
-
"""
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
166
|
+
"""Get current speed of the selected clock (MHz).
|
|
167
|
+
Args:
|
|
168
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
169
|
+
clock_type (int): Clock type.
|
|
170
|
+
Returns:
|
|
171
|
+
int: Clock speed in MHz.
|
|
187
172
|
"""
|
|
188
173
|
global _hlmlOBJ
|
|
189
174
|
speed = ctypes.c_uint()
|
|
@@ -195,12 +180,12 @@ def hlmlDeviceGetClockInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) -> in
|
|
|
195
180
|
return speed.value
|
|
196
181
|
|
|
197
182
|
def hlmlDeviceGetMaxClockInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) -> int:
|
|
198
|
-
"""
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
183
|
+
"""Get maximum speed of the selected clock (MHz).
|
|
184
|
+
Args:
|
|
185
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
186
|
+
clock_type (int): Clock type.
|
|
187
|
+
Returns:
|
|
188
|
+
int: Maximum clock speed in MHz.
|
|
204
189
|
"""
|
|
205
190
|
global _hlmlOBJ
|
|
206
191
|
speed = ctypes.c_uint()
|
|
@@ -212,12 +197,12 @@ def hlmlDeviceGetMaxClockInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) ->
|
|
|
212
197
|
return speed.value
|
|
213
198
|
|
|
214
199
|
def hlmlDeviceGetClockLimitInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) -> int:
|
|
215
|
-
"""
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
200
|
+
"""Get frequency limit of the selected clock (MHz).
|
|
201
|
+
Args:
|
|
202
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
203
|
+
clock_type (int): Clock type.
|
|
204
|
+
Returns:
|
|
205
|
+
int: Frequency limit in MHz.
|
|
221
206
|
"""
|
|
222
207
|
global _hlmlOBJ
|
|
223
208
|
speed = ctypes.c_uint()
|
|
@@ -229,11 +214,11 @@ def hlmlDeviceGetClockLimitInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 )
|
|
|
229
214
|
return speed.value
|
|
230
215
|
|
|
231
216
|
def hlmlDeviceGetUtilizationRates(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_utilization:
|
|
232
|
-
"""
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
217
|
+
"""Get device utilization rates over the past second.
|
|
218
|
+
Args:
|
|
219
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
220
|
+
Returns:
|
|
221
|
+
c_hlml_utilization: Utilization rates.
|
|
237
222
|
"""
|
|
238
223
|
global _hlmlOBJ
|
|
239
224
|
hlml_util = hlml_t.c_hlml_utilization()
|
|
@@ -245,11 +230,11 @@ def hlmlDeviceGetUtilizationRates(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_h
|
|
|
245
230
|
return hlml_util
|
|
246
231
|
|
|
247
232
|
def hlmlDeviceGetProcessUtilization(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_process_utilization:
|
|
248
|
-
"""
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
233
|
+
"""Get process utilization rates (as a percentage) over the past second.
|
|
234
|
+
Args:
|
|
235
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
236
|
+
Returns:
|
|
237
|
+
c_hlml_process_utilization: Process utilization rates.
|
|
253
238
|
"""
|
|
254
239
|
global _hlmlOBJ
|
|
255
240
|
hlml_util = hlml_t.c_hlml_process_utilization()
|
|
@@ -261,11 +246,11 @@ def hlmlDeviceGetProcessUtilization(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c
|
|
|
261
246
|
return hlml_util
|
|
262
247
|
|
|
263
248
|
def hlmlDeviceGetMemoryInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_memory:
|
|
264
|
-
"""
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
249
|
+
"""Get total, used, and free memory in bytes.
|
|
250
|
+
Args:
|
|
251
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
252
|
+
Returns:
|
|
253
|
+
c_hlml_memory: Memory info.
|
|
269
254
|
"""
|
|
270
255
|
global _hlmlOBJ
|
|
271
256
|
hlml_mem = hlml_t.c_hlml_memory()
|
|
@@ -278,12 +263,12 @@ def hlmlDeviceGetMemoryInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_me
|
|
|
278
263
|
|
|
279
264
|
def hlmlDeviceGetTemperature(
|
|
280
265
|
device: hlml_t.HLML_DEVICE.TYPE, sensor_type: hlml_t.HLML_TEMP_SENS.TYPE) -> int:
|
|
281
|
-
"""
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
266
|
+
"""Get current temperature (Celsius) of the selected sensor.
|
|
267
|
+
Args:
|
|
268
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
269
|
+
sensor_type (HLML_TEMP_SENS.TYPE): Sensor type.
|
|
270
|
+
Returns:
|
|
271
|
+
int: Temperature in Celsius.
|
|
287
272
|
"""
|
|
288
273
|
global _hlmlOBJ
|
|
289
274
|
temp = ctypes.c_uint()
|
|
@@ -295,12 +280,12 @@ def hlmlDeviceGetTemperature(
|
|
|
295
280
|
return temp.value
|
|
296
281
|
|
|
297
282
|
def hlmlDeviceGetTemperatureThreshold(device: hlml_t.HLML_DEVICE.TYPE, threshold_type: int) -> int:
|
|
298
|
-
"""
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
283
|
+
"""Get temperature threshold (Celsius) of the requested type.
|
|
284
|
+
Args:
|
|
285
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
286
|
+
threshold_type (int): Threshold type.
|
|
287
|
+
Returns:
|
|
288
|
+
int: Threshold temperature in Celsius.
|
|
304
289
|
"""
|
|
305
290
|
global _hlmlOBJ
|
|
306
291
|
temp = ctypes.c_uint()
|
|
@@ -311,12 +296,12 @@ def hlmlDeviceGetTemperatureThreshold(device: hlml_t.HLML_DEVICE.TYPE, threshold
|
|
|
311
296
|
check_return(ret)
|
|
312
297
|
return temp.value
|
|
313
298
|
|
|
314
|
-
def hlmlDeviceGetPersistenceMode(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
315
|
-
"""
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
299
|
+
def hlmlDeviceGetPersistenceMode(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
300
|
+
"""Get persistence mode of the device.
|
|
301
|
+
Args:
|
|
302
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
303
|
+
Returns:
|
|
304
|
+
int: Persistence mode.
|
|
320
305
|
"""
|
|
321
306
|
global _hlmlOBJ
|
|
322
307
|
mode = ctypes.c_uint()
|
|
@@ -327,12 +312,12 @@ def hlmlDeviceGetPersistenceMode(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.HLML
|
|
|
327
312
|
check_return(ret)
|
|
328
313
|
return mode.value
|
|
329
314
|
|
|
330
|
-
def hlmlDeviceGetPerformanceState(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
331
|
-
"""
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
315
|
+
def hlmlDeviceGetPerformanceState(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
316
|
+
"""Get performance state of the device.
|
|
317
|
+
Args:
|
|
318
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
319
|
+
Returns:
|
|
320
|
+
int: Performance state.
|
|
336
321
|
"""
|
|
337
322
|
global _hlmlOBJ
|
|
338
323
|
p_state = ctypes.c_uint()
|
|
@@ -343,19 +328,16 @@ def hlmlDeviceGetPerformanceState(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.HLM
|
|
|
343
328
|
check_return(ret)
|
|
344
329
|
return p_state.value
|
|
345
330
|
|
|
346
|
-
def hlmlDeviceGetSupportedPerformanceStates(
|
|
347
|
-
"""
|
|
348
|
-
The returned array
|
|
349
|
-
of
|
|
350
|
-
If the number of supported
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
all the supported performance state of the device.
|
|
357
|
-
If the number of supported P-States is fewer than the size of the array
|
|
358
|
-
missing elements would contain HLML_PSTATE_UNKNOWN.
|
|
331
|
+
def hlmlDeviceGetSupportedPerformanceStates(device: hlml_t.HLML_DEVICE.TYPE) -> tuple:
|
|
332
|
+
"""Get all supported performance states for the device.
|
|
333
|
+
The returned array is of size HLML_PSTATE_NUM_SUPPORTED and contains a contiguous
|
|
334
|
+
list of performance states that the device supports.
|
|
335
|
+
If the number of supported performance states is less than HLML_PSTATE_NUM_SUPPORTED,
|
|
336
|
+
the remaining entries in the array will be set to HLML_PSTATE_UNKNOWN.
|
|
337
|
+
Args:
|
|
338
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
339
|
+
Returns:
|
|
340
|
+
HLML_P_STATES array: Supported performance states.
|
|
359
341
|
"""
|
|
360
342
|
global _hlmlOBJ
|
|
361
343
|
p_states = (hlml_t.HLML_P_STATES.TYPE * hlml_t.HLML_PSTATE_NUM_SUPPORTED)()
|
|
@@ -367,11 +349,11 @@ def hlmlDeviceGetSupportedPerformanceStates( device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
|
367
349
|
return p_states
|
|
368
350
|
|
|
369
351
|
def hlmlDeviceGetPowerUsage(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
370
|
-
"""
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
352
|
+
"""Get power usage for the device in mW.
|
|
353
|
+
Args:
|
|
354
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
355
|
+
Returns:
|
|
356
|
+
int: Power usage in mW.
|
|
375
357
|
"""
|
|
376
358
|
global _hlmlOBJ
|
|
377
359
|
power = ctypes.c_uint()
|
|
@@ -383,12 +365,10 @@ def hlmlDeviceGetPowerUsage(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
383
365
|
return power.value
|
|
384
366
|
|
|
385
367
|
def hlmlDeviceSetPowerManagementLimit(device: hlml_t.HLML_DEVICE.TYPE, limit : ctypes.c_uint) -> None:
|
|
386
|
-
"""
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
Returns:
|
|
391
|
-
ret (HLML_RETURN) - The status of the operation.
|
|
368
|
+
"""Set power management limit on this device in mW.
|
|
369
|
+
Args:
|
|
370
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
371
|
+
limit (ctypes.c_uint): Power limit in mW.
|
|
392
372
|
"""
|
|
393
373
|
global _hlmlOBJ
|
|
394
374
|
|
|
@@ -399,11 +379,11 @@ def hlmlDeviceSetPowerManagementLimit(device: hlml_t.HLML_DEVICE.TYPE, limit : c
|
|
|
399
379
|
return None
|
|
400
380
|
|
|
401
381
|
def hlmlDeviceGetPowerManagementDefaultLimit(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
402
|
-
"""
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
382
|
+
"""Get default power management limit on this device in mW.
|
|
383
|
+
Args:
|
|
384
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
385
|
+
Returns:
|
|
386
|
+
int: Default power limit in mW.
|
|
407
387
|
"""
|
|
408
388
|
global _hlmlOBJ
|
|
409
389
|
power = ctypes.c_uint()
|
|
@@ -414,12 +394,12 @@ def hlmlDeviceGetPowerManagementDefaultLimit(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
|
414
394
|
check_return(ret)
|
|
415
395
|
return power.value
|
|
416
396
|
|
|
417
|
-
def hlmlDeviceGetECCMode(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
418
|
-
"""
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
397
|
+
def hlmlDeviceGetECCMode(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.hlml_ecc_mode:
|
|
398
|
+
"""Get current and pending ECC modes of the device.
|
|
399
|
+
Args:
|
|
400
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
401
|
+
Returns:
|
|
402
|
+
hlml_ecc_mode: ECC mode info with 'current' and 'pending' attributes.
|
|
423
403
|
"""
|
|
424
404
|
global _hlmlOBJ
|
|
425
405
|
out = hlml_t.hlml_ecc_mode()
|
|
@@ -436,14 +416,13 @@ def hlmlDeviceGetECCMode(device: hlml_t.HLML_DEVICE.TYPE) -> dict:
|
|
|
436
416
|
return out
|
|
437
417
|
|
|
438
418
|
def hlmlDeviceGetTotalECCErrors(device: hlml_t.HLML_DEVICE.TYPE, error_type: hlml_t.HLML_MEMORY_ERROR.TYPE, counter_type: hlml_t.HLML_ECC_COUNTER) -> int:
|
|
439
|
-
"""
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
count (int) - The number of ECC errors for the device, specified by parameters.
|
|
419
|
+
"""Get number of ECC errors for a device since last reset or driver reinstall.
|
|
420
|
+
Args:
|
|
421
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
422
|
+
error_type (HLML_MEMORY_ERROR.TYPE): Error type to count.
|
|
423
|
+
counter_type (HLML_ECC_COUNTER): Counter type to use.
|
|
424
|
+
Returns:
|
|
425
|
+
int: Number of ECC errors.
|
|
447
426
|
"""
|
|
448
427
|
global _hlmlOBJ
|
|
449
428
|
count = ctypes.c_longlong()
|
|
@@ -455,16 +434,16 @@ def hlmlDeviceGetTotalECCErrors(device: hlml_t.HLML_DEVICE.TYPE, error_type: hlm
|
|
|
455
434
|
return count.value
|
|
456
435
|
|
|
457
436
|
def hlmlDeviceGetMemoryErrorCounter(device: hlml_t.HLML_DEVICE.TYPE, error_type: hlml_t.HLML_MEMORY_ERROR.TYPE, counter_type: hlml_t.HLML_ECC_COUNTER.TYPE, location: hlml_t.HLML_MEMORY_LOCATION.TYPE) -> int:
|
|
458
|
-
"""
|
|
459
|
-
|
|
460
|
-
of corrected errors is supported.
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
437
|
+
"""Get number of ECC errors for a device at a specified memory location.
|
|
438
|
+
The number is from the last reset or driver reinstall. Currently, only the
|
|
439
|
+
number of corrected errors is supported.
|
|
440
|
+
Args:
|
|
441
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
442
|
+
error_type (HLML_MEMORY_ERROR.TYPE): Error type to count.
|
|
443
|
+
counter_type (HLML_ECC_COUNTER.TYPE): Counter type to use.
|
|
444
|
+
location (HLML_MEMORY_LOCATION.TYPE): Memory location.
|
|
445
|
+
Returns:
|
|
446
|
+
int: Number of ECC errors.
|
|
468
447
|
"""
|
|
469
448
|
global _hlmlOBJ
|
|
470
449
|
ecc_count = ctypes.c_longlong()
|
|
@@ -475,12 +454,12 @@ def hlmlDeviceGetMemoryErrorCounter(device: hlml_t.HLML_DEVICE.TYPE, error_type:
|
|
|
475
454
|
check_return(ret)
|
|
476
455
|
return ecc_count.value
|
|
477
456
|
|
|
478
|
-
def hlmlDeviceGetUUID(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
479
|
-
"""
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
457
|
+
def hlmlDeviceGetUUID(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
458
|
+
"""Get UUID (Universal Unique ID) of the device.
|
|
459
|
+
Args:
|
|
460
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
461
|
+
Returns:
|
|
462
|
+
bytes: Device UUID.
|
|
484
463
|
"""
|
|
485
464
|
global _hlmlOBJ
|
|
486
465
|
name_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -493,12 +472,12 @@ def hlmlDeviceGetUUID(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
493
472
|
return name.value
|
|
494
473
|
|
|
495
474
|
def hlmlDeviceGetMinorNumber(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
496
|
-
"""
|
|
497
|
-
at /sys/class/accel/accel[minor]
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
475
|
+
"""Get minor number of the device (maps to device node file
|
|
476
|
+
at /sys/class/accel/accel[minor]).
|
|
477
|
+
Args:
|
|
478
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
479
|
+
Returns:
|
|
480
|
+
int: Minor number.
|
|
502
481
|
"""
|
|
503
482
|
global _hlmlOBJ
|
|
504
483
|
number = ctypes.c_uint()
|
|
@@ -510,10 +489,9 @@ def hlmlDeviceGetMinorNumber(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
510
489
|
return number.value
|
|
511
490
|
|
|
512
491
|
def hlmlEventSetCreate() -> hlml_t.HLML_EVENT_SET.TYPE:
|
|
513
|
-
"""
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
st (HLML_EVENT_SET) - An empty set of events.
|
|
492
|
+
"""Create an empty set of events.
|
|
493
|
+
Returns:
|
|
494
|
+
HLML_EVENT_SET.TYPE: Empty event set.
|
|
517
495
|
"""
|
|
518
496
|
global _hlmlOBJ
|
|
519
497
|
st = hlml_t.HLML_EVENT_SET.TYPE()
|
|
@@ -525,10 +503,9 @@ def hlmlEventSetCreate() -> hlml_t.HLML_EVENT_SET.TYPE:
|
|
|
525
503
|
return st
|
|
526
504
|
|
|
527
505
|
def hlmlEventSetFree(st: hlml_t.HLML_EVENT_SET.TYPE) -> None:
|
|
528
|
-
"""
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
Returns: None.
|
|
506
|
+
"""Release a set of events.
|
|
507
|
+
Args:
|
|
508
|
+
st (HLML_EVENT_SET.TYPE): Event set to release.
|
|
532
509
|
"""
|
|
533
510
|
global _hlmlOBJ
|
|
534
511
|
|
|
@@ -542,12 +519,11 @@ def hlmlDeviceRegisterEvents(
|
|
|
542
519
|
device: hlml_t.HLML_DEVICE.TYPE, event_types: int,
|
|
543
520
|
st: hlml_t.HLML_EVENT_SET.TYPE
|
|
544
521
|
) -> None:
|
|
545
|
-
"""
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
Returns: None.
|
|
522
|
+
"""Start recording events on device and add events to set.
|
|
523
|
+
Args:
|
|
524
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
525
|
+
event_types (int): Event types to record.
|
|
526
|
+
st (HLML_EVENT_SET.TYPE): Event set (buffer) to be written to.
|
|
551
527
|
"""
|
|
552
528
|
global _hlmlOBJ
|
|
553
529
|
|
|
@@ -558,14 +534,15 @@ def hlmlDeviceRegisterEvents(
|
|
|
558
534
|
return None
|
|
559
535
|
|
|
560
536
|
def hlmlEventSetWait(st: hlml_t.HLML_EVENT_SET.TYPE, timeout: int) -> hlml_t.c_hlml_event_data:
|
|
561
|
-
"""
|
|
562
|
-
If
|
|
563
|
-
If there are no events
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
537
|
+
"""Wait for events and deliver event data.
|
|
538
|
+
If any events are available at the time of the call, function returns immediately.
|
|
539
|
+
If there are no events available, it waits until an event arrives or the specified
|
|
540
|
+
timeout is reached.
|
|
541
|
+
Args:
|
|
542
|
+
st (HLML_EVENT_SET.TYPE): Event set (buffer) to be written to.
|
|
543
|
+
timeout (int): Maximum time to wait for an event.
|
|
544
|
+
Returns:
|
|
545
|
+
c_hlml_event_data: Event data.
|
|
569
546
|
"""
|
|
570
547
|
global _hlmlOBJ
|
|
571
548
|
data = hlml_t.c_hlml_event_data()
|
|
@@ -577,14 +554,14 @@ def hlmlEventSetWait(st: hlml_t.HLML_EVENT_SET.TYPE, timeout: int) -> hlml_t.c_h
|
|
|
577
554
|
return data
|
|
578
555
|
|
|
579
556
|
def hlmlDeviceGetMACInfo(
|
|
580
|
-
device: hlml_t.HLML_DEVICE.TYPE, count=20, start=1) ->
|
|
581
|
-
"""
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
557
|
+
device: hlml_t.HLML_DEVICE.TYPE, count=20, start=1) -> tuple:
|
|
558
|
+
"""Get MAC addresses of device.
|
|
559
|
+
Args:
|
|
560
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
561
|
+
count (int): Number of addresses to return.
|
|
562
|
+
start (int): Index to start at.
|
|
563
|
+
Returns:
|
|
564
|
+
c_hlml_mac_info array: MAC addresses.
|
|
588
565
|
"""
|
|
589
566
|
global _hlmlOBJ
|
|
590
567
|
mac = (hlml_t.c_hlml_mac_info * count)()
|
|
@@ -597,11 +574,11 @@ def hlmlDeviceGetMACInfo(
|
|
|
597
574
|
return mac
|
|
598
575
|
|
|
599
576
|
def hlmlDeviceGetHLRevision(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
600
|
-
"""
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
577
|
+
"""Get HL revision of the device.
|
|
578
|
+
Args:
|
|
579
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
580
|
+
Returns:
|
|
581
|
+
int: HL revision.
|
|
605
582
|
"""
|
|
606
583
|
global _hlmlOBJ
|
|
607
584
|
rev = ctypes.c_int()
|
|
@@ -613,11 +590,11 @@ def hlmlDeviceGetHLRevision(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
613
590
|
return rev.value
|
|
614
591
|
|
|
615
592
|
def hlmlDeviceGetPCBInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_pcb_info:
|
|
616
|
-
"""
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
593
|
+
"""Get PCB info of the device.
|
|
594
|
+
Args:
|
|
595
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
596
|
+
Returns:
|
|
597
|
+
c_hlml_pcb_info: PCB info.
|
|
621
598
|
"""
|
|
622
599
|
global _hlmlOBJ
|
|
623
600
|
pcb = hlml_t.c_hlml_pcb_info()
|
|
@@ -628,12 +605,12 @@ def hlmlDeviceGetPCBInfo(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.c_hlml_pcb_i
|
|
|
628
605
|
check_return(ret)
|
|
629
606
|
return pcb
|
|
630
607
|
|
|
631
|
-
def hlmlDeviceGetSerial(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
632
|
-
"""
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
608
|
+
def hlmlDeviceGetSerial(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
609
|
+
"""Get unique board serial number.
|
|
610
|
+
Args:
|
|
611
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
612
|
+
Returns:
|
|
613
|
+
bytes: Serial number.
|
|
637
614
|
"""
|
|
638
615
|
global _hlmlOBJ
|
|
639
616
|
ser_len = hlml_t.HLML_DEFINE.HL_FIELD_MAX_SIZE
|
|
@@ -646,11 +623,11 @@ def hlmlDeviceGetSerial(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
646
623
|
return ser.value
|
|
647
624
|
|
|
648
625
|
def hlmlDeviceGetModuleID(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
649
|
-
"""
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
626
|
+
"""Get module ID configured on the device.
|
|
627
|
+
Args:
|
|
628
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
629
|
+
Returns:
|
|
630
|
+
int: Module ID.
|
|
654
631
|
"""
|
|
655
632
|
global _hlmlOBJ
|
|
656
633
|
module_id = ctypes.c_uint()
|
|
@@ -662,11 +639,11 @@ def hlmlDeviceGetModuleID(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
662
639
|
return module_id.value
|
|
663
640
|
|
|
664
641
|
def hlmlDeviceGetBoardID(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
665
|
-
"""
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
642
|
+
"""Get device board ID (slot number between 0 and 7).
|
|
643
|
+
Args:
|
|
644
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
645
|
+
Returns:
|
|
646
|
+
int: Board ID.
|
|
670
647
|
"""
|
|
671
648
|
global _hlmlOBJ
|
|
672
649
|
brd = ctypes.c_uint()
|
|
@@ -678,13 +655,12 @@ def hlmlDeviceGetBoardID(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
678
655
|
return brd.value
|
|
679
656
|
|
|
680
657
|
def hlmlDeviceGetPCIEThroughput(device: hlml_t.HLML_DEVICE.TYPE, counter_type: int) -> int:
|
|
681
|
-
"""
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
throughput (int) - The throughput on the PCIE Transfer or Recieve Connection.
|
|
658
|
+
"""Get PCIe utilization information (over 10ms interval).
|
|
659
|
+
Args:
|
|
660
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
661
|
+
counter_type (int): 0 for TX, 1 for RX.
|
|
662
|
+
Returns:
|
|
663
|
+
int: PCIe throughput.
|
|
688
664
|
"""
|
|
689
665
|
global _hlmlOBJ
|
|
690
666
|
pcie = ctypes.c_uint()
|
|
@@ -696,11 +672,11 @@ def hlmlDeviceGetPCIEThroughput(device: hlml_t.HLML_DEVICE.TYPE, counter_type: i
|
|
|
696
672
|
return pcie.value
|
|
697
673
|
|
|
698
674
|
def hlmlDeviceGetPCIEReplayCounter(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
699
|
-
"""
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
675
|
+
"""Get PCIe replay counter.
|
|
676
|
+
Args:
|
|
677
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
678
|
+
Returns:
|
|
679
|
+
int: Replay counter.
|
|
704
680
|
"""
|
|
705
681
|
global _hlmlOBJ
|
|
706
682
|
pcie = ctypes.c_uint()
|
|
@@ -712,11 +688,11 @@ def hlmlDeviceGetPCIEReplayCounter(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
712
688
|
return pcie.value
|
|
713
689
|
|
|
714
690
|
def hlmlDeviceGetCurrPCIELinkGeneration(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
715
|
-
"""
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
691
|
+
"""Get current PCIe link generation.
|
|
692
|
+
Args:
|
|
693
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
694
|
+
Returns:
|
|
695
|
+
int: PCIe link generation.
|
|
720
696
|
"""
|
|
721
697
|
global _hlmlOBJ
|
|
722
698
|
link = ctypes.c_uint()
|
|
@@ -728,11 +704,11 @@ def hlmlDeviceGetCurrPCIELinkGeneration(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
728
704
|
return link.value
|
|
729
705
|
|
|
730
706
|
def hlmlDeviceGetCurrPCIELinkWidth(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
731
|
-
"""
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
707
|
+
"""Get current PCIe link width.
|
|
708
|
+
Args:
|
|
709
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
710
|
+
Returns:
|
|
711
|
+
int: PCIe link width.
|
|
736
712
|
"""
|
|
737
713
|
global _hlmlOBJ
|
|
738
714
|
width = ctypes.c_uint()
|
|
@@ -744,11 +720,11 @@ def hlmlDeviceGetCurrPCIELinkWidth(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
744
720
|
return width.value
|
|
745
721
|
|
|
746
722
|
def hlmlDeviceGetCurrentClocksThrottleReasons(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
747
|
-
"""
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
723
|
+
"""Get current clocks throttle reason.
|
|
724
|
+
Args:
|
|
725
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
726
|
+
Returns:
|
|
727
|
+
int: Throttle reason code.
|
|
752
728
|
"""
|
|
753
729
|
global _hlmlOBJ
|
|
754
730
|
reason = ctypes.c_ulonglong()
|
|
@@ -760,11 +736,11 @@ def hlmlDeviceGetCurrentClocksThrottleReasons(device: hlml_t.HLML_DEVICE.TYPE) -
|
|
|
760
736
|
return reason.value
|
|
761
737
|
|
|
762
738
|
def hlmlDeviceGetTotalEnergyConsumption(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
763
|
-
"""
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
739
|
+
"""Get total energy consumption in mJ since last driver reload.
|
|
740
|
+
Args:
|
|
741
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
742
|
+
Returns:
|
|
743
|
+
int: Total energy consumption in mJ.
|
|
768
744
|
"""
|
|
769
745
|
global _hlmlOBJ
|
|
770
746
|
energy = ctypes.c_ulonglong()
|
|
@@ -776,14 +752,13 @@ def hlmlDeviceGetTotalEnergyConsumption(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
776
752
|
return energy.value
|
|
777
753
|
|
|
778
754
|
def hlmlDeviceGetMacAddrInfo(device: hlml_t.HLML_DEVICE.TYPE) -> Tuple[Tuple[int, int], Tuple[int, int]]:
|
|
779
|
-
"""
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
mask
|
|
785
|
-
|
|
786
|
-
ports within the supported ports.
|
|
755
|
+
"""Get masks for supported and external ports.
|
|
756
|
+
Args:
|
|
757
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
758
|
+
Returns:
|
|
759
|
+
Tuple[Tuple[int, int], Tuple[int, int]]: (mask, ext_mask), where:
|
|
760
|
+
mask: Bitmask of supported ports.
|
|
761
|
+
ext_mask: Bitmask of external ports (subset of supported).
|
|
787
762
|
"""
|
|
788
763
|
global _hlmlOBJ
|
|
789
764
|
mask = (ctypes.c_uint64 * 2)()
|
|
@@ -796,12 +771,12 @@ def hlmlDeviceGetMacAddrInfo(device: hlml_t.HLML_DEVICE.TYPE) -> Tuple[Tuple[int
|
|
|
796
771
|
return (mask[0], mask[1]), (ext_mask[0], ext_mask[1])
|
|
797
772
|
|
|
798
773
|
def hlmlDeviceNicGetLink(device: hlml_t.HLML_DEVICE.TYPE, port: int) -> bool:
|
|
799
|
-
"""
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
774
|
+
"""Get NIC link status (up/down) for the requested port.
|
|
775
|
+
Args:
|
|
776
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
777
|
+
port (int): Port number.
|
|
778
|
+
Returns:
|
|
779
|
+
bool: Port status. True if up, False if down.
|
|
805
780
|
"""
|
|
806
781
|
global _hlmlOBJ
|
|
807
782
|
up = ctypes.c_bool()
|
|
@@ -813,13 +788,13 @@ def hlmlDeviceNicGetLink(device: hlml_t.HLML_DEVICE.TYPE, port: int) -> bool:
|
|
|
813
788
|
return up.value
|
|
814
789
|
|
|
815
790
|
def hlmlDeviceNicGetStatistics(device: hlml_t.HLML_DEVICE.TYPE, port: int, num_of_counts: int = None) -> hlml_t.c_hlml_nic_stats_info:
|
|
816
|
-
"""
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
791
|
+
"""Get NIC statistics for the requested port.
|
|
792
|
+
Args:
|
|
793
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
794
|
+
port (int): Port number.
|
|
795
|
+
num_of_counts (int, optional): Number of counts to allocate.
|
|
796
|
+
Returns:
|
|
797
|
+
c_hlml_nic_stats_info: NIC statistics.
|
|
823
798
|
"""
|
|
824
799
|
global _hlmlOBJ
|
|
825
800
|
nic_stats_info = hlml_t.c_hlml_nic_stats_info(port, num_of_counts)
|
|
@@ -830,10 +805,10 @@ def hlmlDeviceNicGetStatistics(device: hlml_t.HLML_DEVICE.TYPE, port: int, num_o
|
|
|
830
805
|
check_return(ret)
|
|
831
806
|
return nic_stats_info
|
|
832
807
|
|
|
833
|
-
def hlmlGetHLMLVersion() ->
|
|
834
|
-
"""
|
|
835
|
-
|
|
836
|
-
|
|
808
|
+
def hlmlGetHLMLVersion() -> bytes:
|
|
809
|
+
"""Get version of HLML library.
|
|
810
|
+
Returns:
|
|
811
|
+
bytes: HLML library version.
|
|
837
812
|
"""
|
|
838
813
|
global _hlmlOBJ
|
|
839
814
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -845,10 +820,10 @@ def hlmlGetHLMLVersion() -> str:
|
|
|
845
820
|
check_return(ret)
|
|
846
821
|
return version.value
|
|
847
822
|
|
|
848
|
-
def hlmlGetDriverVersion() ->
|
|
849
|
-
"""
|
|
850
|
-
|
|
851
|
-
|
|
823
|
+
def hlmlGetDriverVersion() -> bytes:
|
|
824
|
+
"""Get version of driver.
|
|
825
|
+
Returns:
|
|
826
|
+
bytes: Driver version.
|
|
852
827
|
"""
|
|
853
828
|
global _hlmlOBJ
|
|
854
829
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -860,10 +835,10 @@ def hlmlGetDriverVersion() -> str:
|
|
|
860
835
|
check_return(ret)
|
|
861
836
|
return version.value
|
|
862
837
|
|
|
863
|
-
def hlmlGetNicDriverVersion() ->
|
|
864
|
-
"""
|
|
865
|
-
|
|
866
|
-
|
|
838
|
+
def hlmlGetNicDriverVersion() -> bytes:
|
|
839
|
+
"""Get version of NIC driver.
|
|
840
|
+
Returns:
|
|
841
|
+
bytes: NIC driver version.
|
|
867
842
|
"""
|
|
868
843
|
global _hlmlOBJ
|
|
869
844
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -875,12 +850,12 @@ def hlmlGetNicDriverVersion() -> str:
|
|
|
875
850
|
check_return(ret)
|
|
876
851
|
return version.value
|
|
877
852
|
|
|
878
|
-
def hlmlDeviceGetModelNumber(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
879
|
-
"""
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
853
|
+
def hlmlDeviceGetModelNumber(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
854
|
+
"""Get model number of the device.
|
|
855
|
+
Args:
|
|
856
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
857
|
+
Returns:
|
|
858
|
+
bytes: Model number.
|
|
884
859
|
"""
|
|
885
860
|
global _hlmlOBJ
|
|
886
861
|
num_len = hlml_t.HLML_DEFINE.HL_FIELD_MAX_SIZE
|
|
@@ -892,12 +867,12 @@ def hlmlDeviceGetModelNumber(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
892
867
|
check_return(ret)
|
|
893
868
|
return num_str.value
|
|
894
869
|
|
|
895
|
-
def hlmlDeviceGetFirmwareFITVersion(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
896
|
-
"""
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
870
|
+
def hlmlDeviceGetFirmwareFITVersion(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
871
|
+
"""Get firmware FIT version.
|
|
872
|
+
Args:
|
|
873
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
874
|
+
Returns:
|
|
875
|
+
bytes: Firmware FIT version.
|
|
901
876
|
"""
|
|
902
877
|
global _hlmlOBJ
|
|
903
878
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -909,12 +884,12 @@ def hlmlDeviceGetFirmwareFITVersion(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
909
884
|
check_return(ret)
|
|
910
885
|
return ver_str.value
|
|
911
886
|
|
|
912
|
-
def hlmlDeviceGetFirmwareSPIVersion(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
913
|
-
"""
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
887
|
+
def hlmlDeviceGetFirmwareSPIVersion(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
888
|
+
"""Get firmware SPI version.
|
|
889
|
+
Args:
|
|
890
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
891
|
+
Returns:
|
|
892
|
+
bytes: Firmware SPI version.
|
|
918
893
|
"""
|
|
919
894
|
global _hlmlOBJ
|
|
920
895
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -926,12 +901,12 @@ def hlmlDeviceGetFirmwareSPIVersion(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
926
901
|
check_return(ret)
|
|
927
902
|
return ver_str.value
|
|
928
903
|
|
|
929
|
-
def hlmlDeviceGetFWBootVersion(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
930
|
-
"""
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
904
|
+
def hlmlDeviceGetFWBootVersion(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
905
|
+
"""Get firmware boot version.
|
|
906
|
+
Args:
|
|
907
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
908
|
+
Returns:
|
|
909
|
+
bytes: Firmware boot version.
|
|
935
910
|
"""
|
|
936
911
|
global _hlmlOBJ
|
|
937
912
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -943,12 +918,12 @@ def hlmlDeviceGetFWBootVersion(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
943
918
|
check_return(ret)
|
|
944
919
|
return ver_str.value
|
|
945
920
|
|
|
946
|
-
def hlmlDeviceGetFWOSVersion(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
947
|
-
"""
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
921
|
+
def hlmlDeviceGetFWOSVersion(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
922
|
+
"""Get firmware OS version.
|
|
923
|
+
Args:
|
|
924
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
925
|
+
Returns:
|
|
926
|
+
bytes: Firmware OS version.
|
|
952
927
|
"""
|
|
953
928
|
global _hlmlOBJ
|
|
954
929
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -960,12 +935,12 @@ def hlmlDeviceGetFWOSVersion(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
960
935
|
check_return(ret)
|
|
961
936
|
return ver_str.value
|
|
962
937
|
|
|
963
|
-
def hlmlDeviceGetCPLDVersion(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
964
|
-
"""
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
938
|
+
def hlmlDeviceGetCPLDVersion(device: hlml_t.HLML_DEVICE.TYPE) -> bytes:
|
|
939
|
+
"""Get CPLD version.
|
|
940
|
+
Args:
|
|
941
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
942
|
+
Returns:
|
|
943
|
+
bytes: CPLD version.
|
|
969
944
|
"""
|
|
970
945
|
global _hlmlOBJ
|
|
971
946
|
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
@@ -978,11 +953,9 @@ def hlmlDeviceGetCPLDVersion(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
978
953
|
return ver_str.value
|
|
979
954
|
|
|
980
955
|
def hlmlDeviceClearCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE) -> None:
|
|
981
|
-
"""
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
Returns:
|
|
985
|
-
None.
|
|
956
|
+
"""Clear device's CPU affinity.
|
|
957
|
+
Args:
|
|
958
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
986
959
|
"""
|
|
987
960
|
global _hlmlOBJ
|
|
988
961
|
|
|
@@ -993,12 +966,12 @@ def hlmlDeviceClearCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE) -> None:
|
|
|
993
966
|
return None
|
|
994
967
|
|
|
995
968
|
def hlmlDeviceGetCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE, cpu_set_size: int):
|
|
996
|
-
"""
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
969
|
+
"""Get CPU affinity set associated with a device.
|
|
970
|
+
Args:
|
|
971
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
972
|
+
cpu_set_size (int): Size of the CPU set.
|
|
973
|
+
Returns:
|
|
974
|
+
array: CPU set.
|
|
1002
975
|
"""
|
|
1003
976
|
global _hlmlOBJ
|
|
1004
977
|
cpu_set = (ctypes.c_ulong * cpu_set_size)()
|
|
@@ -1010,13 +983,13 @@ def hlmlDeviceGetCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE, cpu_set_size: int)
|
|
|
1010
983
|
return cpu_set
|
|
1011
984
|
|
|
1012
985
|
def hlmlDeviceGetCpuAffinityWithinScope(device: hlml_t.HLML_DEVICE.TYPE, cpu_set_size: int, scope: hlml_t.HLML_AFFINITY_SCOPE.TYPE):
|
|
1013
|
-
"""
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
986
|
+
"""Get CPU affinity set associated with a device.
|
|
987
|
+
Args:
|
|
988
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
989
|
+
cpu_set_size (int): Size of the CPU set.
|
|
990
|
+
scope (HLML_AFFINITY_SCOPE.TYPE): Affinity scope.
|
|
991
|
+
Returns:
|
|
992
|
+
array: CPU set.
|
|
1020
993
|
"""
|
|
1021
994
|
global _hlmlOBJ
|
|
1022
995
|
cpu_set = (ctypes.c_ulong * cpu_set_size)()
|
|
@@ -1028,13 +1001,13 @@ def hlmlDeviceGetCpuAffinityWithinScope(device: hlml_t.HLML_DEVICE.TYPE, cpu_set
|
|
|
1028
1001
|
return cpu_set
|
|
1029
1002
|
|
|
1030
1003
|
def hlmlDeviceGetMemoryAffinity(device: hlml_t.HLML_DEVICE.TYPE, node_set_size: int, scope: hlml_t.HLML_AFFINITY_SCOPE.TYPE):
|
|
1031
|
-
"""
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1004
|
+
"""Get memory affinity set associated with a device.
|
|
1005
|
+
Args:
|
|
1006
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1007
|
+
node_set_size (int): Size of the node set.
|
|
1008
|
+
scope (HLML_AFFINITY_SCOPE.TYPE): Affinity scope.
|
|
1009
|
+
Returns:
|
|
1010
|
+
array: Node set.
|
|
1038
1011
|
"""
|
|
1039
1012
|
global _hlmlOBJ
|
|
1040
1013
|
node_set = (ctypes.c_ulong * node_set_size)()
|
|
@@ -1046,11 +1019,9 @@ def hlmlDeviceGetMemoryAffinity(device: hlml_t.HLML_DEVICE.TYPE, node_set_size:
|
|
|
1046
1019
|
return node_set
|
|
1047
1020
|
|
|
1048
1021
|
def hlmlDeviceSetCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE) -> None:
|
|
1049
|
-
"""
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
Returns:
|
|
1053
|
-
None.
|
|
1022
|
+
"""Set CPU affinity for a device.
|
|
1023
|
+
Args:
|
|
1024
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1054
1025
|
"""
|
|
1055
1026
|
global _hlmlOBJ
|
|
1056
1027
|
|
|
@@ -1061,14 +1032,12 @@ def hlmlDeviceSetCpuAffinity(device: hlml_t.HLML_DEVICE.TYPE) -> None:
|
|
|
1061
1032
|
return None
|
|
1062
1033
|
|
|
1063
1034
|
def hlmlDeviceGetViolationStatus(device: hlml_t.HLML_DEVICE.TYPE, perf_policy: hlml_t.HLML_PERF_POLICY.TYPE) -> hlml_t.c_hlml_violation_time:
|
|
1064
|
-
"""
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
Returns:
|
|
1071
|
-
violation_time (c_hlml_violation_time) - The violation status of the device.
|
|
1035
|
+
"""Get violation status of a device for a given performance policy.
|
|
1036
|
+
Args:
|
|
1037
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1038
|
+
perf_policy (HLML_PERF_POLICY.TYPE): Performance policy type.
|
|
1039
|
+
Returns:
|
|
1040
|
+
c_hlml_violation_time: Violation status, comprised of reference time and violation time.
|
|
1072
1041
|
"""
|
|
1073
1042
|
global _hlmlOBJ
|
|
1074
1043
|
|
|
@@ -1081,12 +1050,12 @@ def hlmlDeviceGetViolationStatus(device: hlml_t.HLML_DEVICE.TYPE, perf_policy: h
|
|
|
1081
1050
|
return violation_time
|
|
1082
1051
|
|
|
1083
1052
|
def hlmlDeviceGetReplacedRowsCount(device: hlml_t.HLML_DEVICE.TYPE, cause: hlml_t.HLML_ROW_REPLACEMENT_CAUSE.TYPE) -> int:
|
|
1084
|
-
"""
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1053
|
+
"""Get number of replaced rows for a given cause.
|
|
1054
|
+
Args:
|
|
1055
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1056
|
+
cause (HLML_ROW_REPLACEMENT_CAUSE.TYPE): Replacement cause.
|
|
1057
|
+
Returns:
|
|
1058
|
+
int: Number of replaced rows.
|
|
1090
1059
|
"""
|
|
1091
1060
|
global _hlmlOBJ
|
|
1092
1061
|
|
|
@@ -1099,12 +1068,13 @@ def hlmlDeviceGetReplacedRowsCount(device: hlml_t.HLML_DEVICE.TYPE, cause: hlml_
|
|
|
1099
1068
|
return row_count.value
|
|
1100
1069
|
|
|
1101
1070
|
def hlmlDeviceGetReplacedRows(device: hlml_t.HLML_DEVICE.TYPE, cause: hlml_t.HLML_ROW_REPLACEMENT_CAUSE.TYPE, row_count: int):
|
|
1102
|
-
"""
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1071
|
+
"""Get array of replaced rows for a given cause.
|
|
1072
|
+
Args:
|
|
1073
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1074
|
+
cause (HLML_ROW_REPLACEMENT_CAUSE.TYPE): Replacement cause.
|
|
1075
|
+
row_count (int): Number of rows to retrieve.
|
|
1076
|
+
Returns:
|
|
1077
|
+
array: Array of hlml_t.c_hlml_row_address structures.
|
|
1108
1078
|
"""
|
|
1109
1079
|
global _hlmlOBJ
|
|
1110
1080
|
|
|
@@ -1118,11 +1088,11 @@ def hlmlDeviceGetReplacedRows(device: hlml_t.HLML_DEVICE.TYPE, cause: hlml_t.HLM
|
|
|
1118
1088
|
return addresses
|
|
1119
1089
|
|
|
1120
1090
|
def hlmlDeviceGetReplacedRowsPendingStatus(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
1121
|
-
"""
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1091
|
+
"""Get pending status of replaced rows.
|
|
1092
|
+
Args:
|
|
1093
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1094
|
+
Returns:
|
|
1095
|
+
int: Pending status. True if there are pending replaced rows, False otherwise.
|
|
1126
1096
|
"""
|
|
1127
1097
|
global _hlmlOBJ
|
|
1128
1098
|
|
|
@@ -1135,11 +1105,11 @@ def hlmlDeviceGetReplacedRowsPendingStatus(device: hlml_t.HLML_DEVICE.TYPE) -> i
|
|
|
1135
1105
|
return is_pending.value
|
|
1136
1106
|
|
|
1137
1107
|
def hlmlDeviceGetOperationStatus(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
1138
|
-
"""
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1108
|
+
"""Get operation status of the device.
|
|
1109
|
+
Args:
|
|
1110
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1111
|
+
Returns:
|
|
1112
|
+
str: Operation status.
|
|
1143
1113
|
"""
|
|
1144
1114
|
global _hlmlOBJ
|
|
1145
1115
|
sts_len = hlml_t.COMMON_DEFINE.STATUS_MAX_LEN
|
|
@@ -1151,12 +1121,12 @@ def hlmlDeviceGetOperationStatus(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
|
1151
1121
|
check_return(ret)
|
|
1152
1122
|
return sts_str.value
|
|
1153
1123
|
|
|
1154
|
-
def hlmlDeviceGetPowerManagementMode(device: hlml_t.HLML_DEVICE.TYPE) ->
|
|
1155
|
-
"""
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1124
|
+
def hlmlDeviceGetPowerManagementMode(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
1125
|
+
"""Get power management mode of the device.
|
|
1126
|
+
Args:
|
|
1127
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1128
|
+
Returns:
|
|
1129
|
+
int: Power management mode.
|
|
1160
1130
|
"""
|
|
1161
1131
|
global _hlmlOBJ
|
|
1162
1132
|
mode = ctypes.c_uint()
|
|
@@ -1167,12 +1137,11 @@ def hlmlDeviceGetPowerManagementMode(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.
|
|
|
1167
1137
|
return mode.value
|
|
1168
1138
|
|
|
1169
1139
|
def hlmlDeviceGetPowerManagementLimit(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
1170
|
-
"""
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
limit in mW
|
|
1140
|
+
"""Get power management limit of the device in mW.
|
|
1141
|
+
Args:
|
|
1142
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1143
|
+
Returns:
|
|
1144
|
+
int: Power management limit in mW.
|
|
1176
1145
|
"""
|
|
1177
1146
|
global _hlmlOBJ
|
|
1178
1147
|
power_max = ctypes.c_uint()
|
|
@@ -1183,12 +1152,11 @@ def hlmlDeviceGetPowerManagementLimit(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
|
1183
1152
|
return power_max.value
|
|
1184
1153
|
|
|
1185
1154
|
def hlmlDeviceGetPowerManagementLimitConstraints(device: hlml_t.HLML_DEVICE.TYPE) -> Tuple[int, int]:
|
|
1186
|
-
"""
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
max_limit (int) - The maximum power management limit of the device.
|
|
1155
|
+
"""Get power management limit constraints (min, max) for the device.
|
|
1156
|
+
Args:
|
|
1157
|
+
device (HLML_DEVICE.TYPE): Device handle.
|
|
1158
|
+
Returns:
|
|
1159
|
+
Tuple[int, int]: (min_limit, max_limit)
|
|
1192
1160
|
"""
|
|
1193
1161
|
global _hlmlOBJ
|
|
1194
1162
|
min_limit = ctypes.c_uint()
|
|
@@ -1199,4 +1167,3 @@ def hlmlDeviceGetPowerManagementLimitConstraints(device: hlml_t.HLML_DEVICE.TYPE
|
|
|
1199
1167
|
|
|
1200
1168
|
check_return(ret)
|
|
1201
1169
|
return min_limit.value, max_limit.value
|
|
1202
|
-
|