habana-pyhlml 1.19.2.32__py3-none-any.whl → 1.20.1.97__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.
- {habana_pyhlml-1.19.2.32.dist-info → habana_pyhlml-1.20.1.97.dist-info}/METADATA +1 -1
- habana_pyhlml-1.20.1.97.dist-info/RECORD +10 -0
- pyhlml/hlml_types.py +3 -1
- pyhlml/main.py +38 -0
- habana_pyhlml-1.19.2.32.dist-info/RECORD +0 -10
- {habana_pyhlml-1.19.2.32.dist-info → habana_pyhlml-1.20.1.97.dist-info}/LICENSE +0 -0
- {habana_pyhlml-1.19.2.32.dist-info → habana_pyhlml-1.20.1.97.dist-info}/WHEEL +0 -0
- {habana_pyhlml-1.19.2.32.dist-info → habana_pyhlml-1.20.1.97.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pyhlml/__init__.py,sha256=VjbHqSSypSMmVK7UTxuCyOs_AE8HhTXX9EGr6NbaQNk,25
|
|
2
|
+
pyhlml/hlml_error.py,sha256=GQulGXf-jX38jEASXF22qJ0yL8eC57vUo8s9lVI7q_E,2113
|
|
3
|
+
pyhlml/hlml_lib.py,sha256=JiHRLl3vpAozhCSs9eJC8xlhIMxR2wNVZdmahjlgDfc,1430
|
|
4
|
+
pyhlml/hlml_types.py,sha256=y_6-7eLkKA6vKVxwV8Ww6wNPFpfoOoCPUK86mp0u3uI,11717
|
|
5
|
+
pyhlml/main.py,sha256=BsFgNtkU6PT_C9IkTSQCTSqDLNLngp_jFKyCL35ftzQ,40776
|
|
6
|
+
habana_pyhlml-1.20.1.97.dist-info/LICENSE,sha256=_J8fTEtZF8y69onNU5_EAdOn0AC9RM2uHPh_q36-5bc,1065
|
|
7
|
+
habana_pyhlml-1.20.1.97.dist-info/METADATA,sha256=nXEArqbvZYBkfYszUclgiXD877I2avpMqauu3qeYkJ4,1456
|
|
8
|
+
habana_pyhlml-1.20.1.97.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
9
|
+
habana_pyhlml-1.20.1.97.dist-info/top_level.txt,sha256=0jXJHTTotoeuyzpI1dcVr0mzCVB0NKY7LyCF4OwoMZU,7
|
|
10
|
+
habana_pyhlml-1.20.1.97.dist-info/RECORD,,
|
pyhlml/hlml_types.py
CHANGED
|
@@ -106,9 +106,11 @@ class HLML_P_STATES:
|
|
|
106
106
|
HLML_PSTATE_SENTINEL = 16
|
|
107
107
|
HLML_PSTATE_UNKNOWN = 32
|
|
108
108
|
|
|
109
|
+
HLML_PSTATE_NUM_SUPPORTED = HLML_P_STATES.HLML_PSTATE_SENTINEL
|
|
110
|
+
|
|
109
111
|
class HLML_MEMORY_ERROR:
|
|
110
112
|
TYPE = ctypes.c_uint
|
|
111
|
-
HLML_MEMORY_ERROR_TYPE_CORRECTED = 0
|
|
113
|
+
HLML_MEMORY_ERROR_TYPE_CORRECTED = 0
|
|
112
114
|
HLML_MEMORY_ERROR_TYPE_UNCORRECTED = 1
|
|
113
115
|
HLML_MEMORY_ERROR_TYPE_COUNT = 2
|
|
114
116
|
|
pyhlml/main.py
CHANGED
|
@@ -343,6 +343,29 @@ def hlmlDeviceGetPerformanceState(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.HLM
|
|
|
343
343
|
check_return(ret)
|
|
344
344
|
return p_state.value
|
|
345
345
|
|
|
346
|
+
def hlmlDeviceGetSupportedPerformanceStates( device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.HLML_P_STATES:
|
|
347
|
+
""" Get all supported Performance States (HLML_P_STATES) for the device.
|
|
348
|
+
The returned array will be in size HLML_PSTATE_NUM_SUPPORTED and will contain a contiguous list
|
|
349
|
+
of valid P-States supported by the device.
|
|
350
|
+
If the number of supported P-States is fewer than the size of the array
|
|
351
|
+
missing elements would contain HLML_PSTATE_UNKNOWN.
|
|
352
|
+
Parameters:
|
|
353
|
+
device (HLML_DEVICE.TYPE) - The handle for a habana device.
|
|
354
|
+
Returns:
|
|
355
|
+
p_states (hlml_t.HLML_P_STATES array in size HLML_PSTATE_NUM_SUPPORTED) - that contains
|
|
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.
|
|
359
|
+
"""
|
|
360
|
+
global _hlmlOBJ
|
|
361
|
+
p_states = (hlml_t.HLML_P_STATES.TYPE * hlml_t.HLML_PSTATE_NUM_SUPPORTED)()
|
|
362
|
+
|
|
363
|
+
fn = _hlmlOBJ.get_func_ptr("hlml_device_get_supported_performance_states")
|
|
364
|
+
ret = fn(device, ctypes.byref(p_states), hlml_t.HLML_PSTATE_NUM_SUPPORTED)
|
|
365
|
+
|
|
366
|
+
check_return(ret)
|
|
367
|
+
return p_states
|
|
368
|
+
|
|
346
369
|
def hlmlDeviceGetPowerUsage(device: hlml_t.HLML_DEVICE.TYPE) -> int:
|
|
347
370
|
""" Retrieves power usage for the device in mW
|
|
348
371
|
Parameters:
|
|
@@ -837,6 +860,21 @@ def hlmlGetDriverVersion() -> str:
|
|
|
837
860
|
check_return(ret)
|
|
838
861
|
return version.value
|
|
839
862
|
|
|
863
|
+
def hlmlGetNicDriverVersion() -> str:
|
|
864
|
+
""" Return version of NIC driver.
|
|
865
|
+
Returns:
|
|
866
|
+
ver (str) - Version of NIC driver.
|
|
867
|
+
"""
|
|
868
|
+
global _hlmlOBJ
|
|
869
|
+
ver_len = hlml_t.COMMON_DEFINE.VERSION_MAX_LEN
|
|
870
|
+
version = ctypes.create_string_buffer(ver_len)
|
|
871
|
+
|
|
872
|
+
fn = _hlmlOBJ.get_func_ptr("hlml_get_nic_driver_version")
|
|
873
|
+
ret = fn(version, ctypes.c_uint(ver_len))
|
|
874
|
+
|
|
875
|
+
check_return(ret)
|
|
876
|
+
return version.value
|
|
877
|
+
|
|
840
878
|
def hlmlDeviceGetModelNumber(device: hlml_t.HLML_DEVICE.TYPE) -> str:
|
|
841
879
|
""" Returns model number.
|
|
842
880
|
Parameters:
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pyhlml/__init__.py,sha256=VjbHqSSypSMmVK7UTxuCyOs_AE8HhTXX9EGr6NbaQNk,25
|
|
2
|
-
pyhlml/hlml_error.py,sha256=GQulGXf-jX38jEASXF22qJ0yL8eC57vUo8s9lVI7q_E,2113
|
|
3
|
-
pyhlml/hlml_lib.py,sha256=JiHRLl3vpAozhCSs9eJC8xlhIMxR2wNVZdmahjlgDfc,1430
|
|
4
|
-
pyhlml/hlml_types.py,sha256=AwehWbTpq3D3fAi3U1_hZg88sljr7c4pldoXOo8Yv5Q,11677
|
|
5
|
-
pyhlml/main.py,sha256=U-4PQKZ0RWFVnDWoJrDJ_TBOOhMqtTfshXi7CbR72M8,39118
|
|
6
|
-
habana_pyhlml-1.19.2.32.dist-info/LICENSE,sha256=_J8fTEtZF8y69onNU5_EAdOn0AC9RM2uHPh_q36-5bc,1065
|
|
7
|
-
habana_pyhlml-1.19.2.32.dist-info/METADATA,sha256=pTCeJRmm-yNeQJzgnisylm0c4hrfWl7u1kd-IEQuzvc,1456
|
|
8
|
-
habana_pyhlml-1.19.2.32.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
9
|
-
habana_pyhlml-1.19.2.32.dist-info/top_level.txt,sha256=0jXJHTTotoeuyzpI1dcVr0mzCVB0NKY7LyCF4OwoMZU,7
|
|
10
|
-
habana_pyhlml-1.19.2.32.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|