habana-pyhlml 1.17.0.495__py3-none-any.whl → 1.18.0.524__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: habana-pyhlml
3
- Version: 1.17.0.495
3
+ Version: 1.18.0.524
4
4
  Summary: Python3 wrapper for the HLML library.
5
5
  Home-page: UNKNOWN
6
6
  Author: HabanaAI
@@ -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=agWxLywPOHqmkWuUJqFd5raRtPNG5qvqOorbiXE90bw,10738
5
+ pyhlml/main.py,sha256=TifTYyaDoLiBs8qZESFpnVdFt9QB4kgRS-9uMBOWqPo,37907
6
+ habana_pyhlml-1.18.0.524.dist-info/LICENSE,sha256=_J8fTEtZF8y69onNU5_EAdOn0AC9RM2uHPh_q36-5bc,1065
7
+ habana_pyhlml-1.18.0.524.dist-info/METADATA,sha256=CrVsiG5Ax8x6nNXhtRbm0hUu_dsSVf-7Q38q_FAjWsE,1457
8
+ habana_pyhlml-1.18.0.524.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
9
+ habana_pyhlml-1.18.0.524.dist-info/top_level.txt,sha256=0jXJHTTotoeuyzpI1dcVr0mzCVB0NKY7LyCF4OwoMZU,7
10
+ habana_pyhlml-1.18.0.524.dist-info/RECORD,,
pyhlml/hlml_types.py CHANGED
@@ -188,6 +188,7 @@ class c_hlml_pci_info(_PrintS):
188
188
  * device - The device's id on the bus, 0 to 31
189
189
  * domain - The PCI domain on which the device's bus resides
190
190
  * pci_device_id - The combined 16b deviceId and 16b vendor id
191
+ * pci_subsys_device_id - The combined 16b subsys_id and 16b subsys_vendor_id
191
192
  */
192
193
  """
193
194
  _fields_ = [("bus", ctypes.c_uint),
@@ -196,7 +197,8 @@ class c_hlml_pci_info(_PrintS):
196
197
  ("domain", ctypes.c_uint),
197
198
  ("pci_device_id", ctypes.c_uint),
198
199
  ("caps", c_hlml_pci_cap),
199
- ("pci_rev", ctypes.c_uint)
200
+ ("pci_rev", ctypes.c_uint),
201
+ ("pci_subsys_id", ctypes.c_uint)
200
202
  ]
201
203
 
202
204
  class c_hlml_utilization(_PrintS):
pyhlml/main.py CHANGED
@@ -211,6 +211,23 @@ def hlmlDeviceGetMaxClockInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) ->
211
211
  check_return(ret)
212
212
  return speed.value
213
213
 
214
+ def hlmlDeviceGetClockLimitInfo(device: hlml_t.HLML_DEVICE.TYPE, clock_type=0 ) -> int:
215
+ """ Retrives the frequency limit of the selected clock (MHz)
216
+ Parameters:
217
+ device (HLML_DEVICE.TYPE) - The handle for a habana device.
218
+ clock_type ( 0-SOC ( GAUDI ) / 1-IC ( GOYA ) / 2-MME ( GOYA ) / 3-TPC ( GOYA ) )
219
+ Returns:
220
+ speed (int) - The frequency LIMIT of the selected clock in MHz.
221
+ """
222
+ global _hlmlOBJ
223
+ speed = ctypes.c_uint()
224
+
225
+ fn = _hlmlOBJ.get_func_ptr("hlml_device_get_clock_limit_info")
226
+ ret = fn(device, clock_type, ctypes.byref(speed))
227
+
228
+ check_return(ret)
229
+ return speed.value
230
+
214
231
  def hlmlDeviceGetUtilizationRates(device: hlml_t.HLML_DEVICE.TYPE) -> int:
215
232
  """ Returns utilization over the past second as a percentage
216
233
  Parameters:
@@ -1063,3 +1080,34 @@ def hlmlDeviceGetOperationStatus(device: hlml_t.HLML_DEVICE.TYPE) -> str:
1063
1080
 
1064
1081
  check_return(ret)
1065
1082
  return sts_str.value
1083
+
1084
+ def hlmlDeviceGetPowerManagementMode(device: hlml_t.HLML_DEVICE.TYPE) -> hlml_t.HLML_ENABLE_STATE:
1085
+ """ Acquire name of device from handle
1086
+ Parameters:
1087
+ device (HLML_DEVICE.TYPE) - The handle for a habana device.
1088
+ Returns:
1089
+ mode (int) - The power management mode of the device.
1090
+ """
1091
+ global _hlmlOBJ
1092
+ mode = ctypes.c_uint()
1093
+ fn = _hlmlOBJ.get_func_ptr("hlml_device_get_power_management_mode")
1094
+ ret = fn(device, ctypes.byref(mode))
1095
+
1096
+ check_return(ret)
1097
+ return mode.value
1098
+
1099
+ def hlmlDeviceGetPowerManagementLimit(device: hlml_t.HLML_DEVICE.TYPE) -> int:
1100
+ """ Returns the pending status of replaced rows.
1101
+ Parameters:
1102
+ device (HLML_DEVICE.TYPE) - The handle for a habana device.
1103
+ Returns:
1104
+ limit (int) - Reference in which to return the power management
1105
+ limit in mW
1106
+ """
1107
+ global _hlmlOBJ
1108
+ power_max = ctypes.c_uint()
1109
+ fn = _hlmlOBJ.get_func_ptr("hlml_device_get_power_management_limit")
1110
+ ret = fn(device, ctypes.byref(power_max))
1111
+
1112
+ check_return(ret)
1113
+ return power_max.value
@@ -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=znPABbbwxHfSRiUO4lepgnJumVweRx3AWoU9R84aTss,10603
5
- pyhlml/main.py,sha256=r9wnlzK9qVY2RdxoSpGxbnYyQbS1HKijPkHjogeEEwY,36135
6
- habana_pyhlml-1.17.0.495.dist-info/LICENSE,sha256=_J8fTEtZF8y69onNU5_EAdOn0AC9RM2uHPh_q36-5bc,1065
7
- habana_pyhlml-1.17.0.495.dist-info/METADATA,sha256=LpJrS0Vbdq1s8t3lZskTRyVFZZqHOjlsuWQSCZ3Ro1Y,1457
8
- habana_pyhlml-1.17.0.495.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
9
- habana_pyhlml-1.17.0.495.dist-info/top_level.txt,sha256=0jXJHTTotoeuyzpI1dcVr0mzCVB0NKY7LyCF4OwoMZU,7
10
- habana_pyhlml-1.17.0.495.dist-info/RECORD,,