mbltml.mbltml¶
Attributes¶
| Name | Description |
|---|---|
MBLTML_DRIVER_VERSION_BUFFER_SIZE |
Buffer size (bytes) guaranteed sufficient for mbltmlGetDriverVersion(). |
MBLTML_ON_DEVICE_DRIVER_VERSION_BUFFER_SIZE |
Buffer size (bytes) guaranteed sufficient for mbltmlGetOnDeviceDriverVersion(). |
MBLTML_FIRMWARE_VERSION_BUFFER_SIZE |
Buffer size (bytes) guaranteed sufficient for mbltmlGetFirmwareVersion(). |
MBLTML_NODE_NAME_BUFFER_SIZE |
Buffer size (bytes) guaranteed sufficient for mbltmlGetNodeName(). |
mbltmlDriverType_t |
Identifier of a Mobilint NPU driver. Used to select a driver when calling family-scoped APIs such as mbltmlGetDriverVersion(), and to describe the family of an individual device returned by mbltmlGetDriverType(). |
MBLTML_DRIVER_ERROR |
Invalid or uninitialized value. |
MBLTML_DRIVER_ARIES |
ARIES Driver. |
MBLTML_DRIVER_REGULUS |
REGULUS (SoC) Driver. |
MBLTML_DRIVER_REGULUS_USB |
REGULUS (USB) Driver. |
mbltmlTargetDeviceType_t |
Specific target device type of a Mobilint NPU. |
MBLTML_TARGET_DEVICE_ARIES_RA |
aries-ra. |
MBLTML_TARGET_DEVICE_REGULUS_RA |
regulus-ra. |
MBLTML_TARGET_DEVICE_ARIES_RB |
aries-rb. |
MBLTML_TARGET_DEVICE_REGULUS_RB |
regulus-rb. |
MBLTML_TARGET_DEVICE_REGULUS_RA_USB |
regulus-ra-usb. |
MBLTML_TARGET_DEVICE_REGULUS_RB_USB |
regulus-rb-usb. |
MBLTML_TARGET_DEVICE_ERROR |
Invalid or uninitialized. |
mbltmlStatusCode_t |
Status code returned by mbltml C APIs. In this Python binding, non-success codes are translated into MBLTMLError subclasses raised by the wrapper functions. |
MBLTML_SUCCESS |
Operation completed successfully. |
MBLTML_DRIVER_NOT_FOUND |
Required driver could not be located. |
MBLTML_INVALID_ARGUMENT |
Invalid argument (NULL or out-of-range index). |
MBLTML_UNINITIALIZED |
API used before initialization. |
MBLTML_NOT_SUPPORTED |
Feature not supported on the target device. |
MBLTML_INSUFFICIENT_LENGTH |
Output buffer is too small. |
MBLTML_DEVICE_NOT_FOUND |
Requested device could not be located. |
mbltmlExtraPmicId_t |
Identifier of an extra PMIC rail. Selects which auxiliary PMIC rail is reported by mbltmlGetExtraPmic*(). The active selection is changed with mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId(). |
MBLTML_EXTRA_PMIC_ID_NPU |
NPU rail. |
MBLTML_EXTRA_PMIC_ID_DDR |
DDR rail. |
MBLTML_EXTRA_PMIC_ID_PMIC |
PMIC rail. |
MBLTML_EXTRA_PMIC_ID_GOLDFINGER |
Goldfinger rail. |
mbltmlCluster_t |
NPU cluster identifier within a device. |
MBLTML_CLUSTER_0 |
Cluster 0. |
MBLTML_CLUSTER_1 |
Cluster 1. |
MBLTML_CLUSTER_ERROR |
Represents an invalid or uninitialized state. |
mbltmlCore_t |
NPU core identifier within a cluster. |
MBLTML_CORE_0 |
Local core 0. |
MBLTML_CORE_1 |
Local core 1. |
MBLTML_CORE_2 |
Local core 2. |
MBLTML_CORE_3 |
Local core 3. |
MBLTML_CORE_GLOBAL |
Global (all cores aggregated). |
MBLTML_CORE_ERROR |
Represents an invalid or uninitialized state. |
MBLTML_DRIVER_VERSION_BUFFER_SIZE¶
Buffer size (bytes) guaranteed sufficient for mbltmlGetDriverVersion().
MBLTML_ON_DEVICE_DRIVER_VERSION_BUFFER_SIZE¶
Buffer size (bytes) guaranteed sufficient for mbltmlGetOnDeviceDriverVersion().
MBLTML_FIRMWARE_VERSION_BUFFER_SIZE¶
Buffer size (bytes) guaranteed sufficient for mbltmlGetFirmwareVersion().
MBLTML_NODE_NAME_BUFFER_SIZE¶
Buffer size (bytes) guaranteed sufficient for mbltmlGetNodeName().
mbltmlDriverType_t¶
Identifier of a Mobilint NPU driver. Used to select a driver when calling family-scoped APIs such as mbltmlGetDriverVersion(), and to describe the family of an individual device returned by mbltmlGetDriverType().
MBLTML_DRIVER_ERROR¶
Invalid or uninitialized value.
MBLTML_DRIVER_ARIES¶
ARIES Driver.
MBLTML_DRIVER_REGULUS¶
REGULUS (SoC) Driver.
MBLTML_DRIVER_REGULUS_USB¶
REGULUS (USB) Driver.
mbltmlTargetDeviceType_t¶
Specific target device type of a Mobilint NPU.
MBLTML_TARGET_DEVICE_ARIES_RA¶
aries-ra.
MBLTML_TARGET_DEVICE_REGULUS_RA¶
regulus-ra.
MBLTML_TARGET_DEVICE_ARIES_RB¶
aries-rb.
MBLTML_TARGET_DEVICE_REGULUS_RB¶
regulus-rb.
MBLTML_TARGET_DEVICE_REGULUS_RA_USB¶
regulus-ra-usb.
MBLTML_TARGET_DEVICE_REGULUS_RB_USB¶
regulus-rb-usb.
MBLTML_TARGET_DEVICE_ERROR¶
Invalid or uninitialized.
mbltmlStatusCode_t¶
Status code returned by mbltml C APIs. In this Python binding, non-success codes are translated into MBLTMLError subclasses raised by the wrapper functions.
MBLTML_SUCCESS¶
Operation completed successfully.
MBLTML_DRIVER_NOT_FOUND¶
Required driver could not be located.
MBLTML_INVALID_ARGUMENT¶
Invalid argument (NULL or out-of-range index).
MBLTML_UNINITIALIZED¶
API used before initialization.
MBLTML_NOT_SUPPORTED¶
Feature not supported on the target device.
MBLTML_INSUFFICIENT_LENGTH¶
Output buffer is too small.
MBLTML_DEVICE_NOT_FOUND¶
Requested device could not be located.
mbltmlExtraPmicId_t¶
Identifier of an extra PMIC rail. Selects which auxiliary PMIC rail is reported by mbltmlGetExtraPmic*(). The active selection is changed with mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
MBLTML_EXTRA_PMIC_ID_NPU¶
NPU rail.
MBLTML_EXTRA_PMIC_ID_DDR¶
DDR rail.
MBLTML_EXTRA_PMIC_ID_PMIC¶
PMIC rail.
MBLTML_EXTRA_PMIC_ID_GOLDFINGER¶
Goldfinger rail.
mbltmlCluster_t¶
NPU cluster identifier within a device.
MBLTML_CLUSTER_0¶
Cluster 0.
MBLTML_CLUSTER_1¶
Cluster 1.
MBLTML_CLUSTER_ERROR¶
Represents an invalid or uninitialized state.
mbltmlCore_t¶
NPU core identifier within a cluster.
MBLTML_CORE_0¶
Local core 0.
MBLTML_CORE_1¶
Local core 1.
MBLTML_CORE_2¶
Local core 2.
MBLTML_CORE_3¶
Local core 3.
MBLTML_CORE_GLOBAL¶
Global (all cores aggregated).
MBLTML_CORE_ERROR¶
Represents an invalid or uninitialized state.
mbltmlCoreId_t¶
Composite identifier of an NPU core (cluster + core).
Parameters
cluster— Cluster to which the core belongs (mbltmlCluster_t).core— Core within the cluster (mbltmlCore_t).
Attributes¶
| Name | Description |
|---|---|
cluster |
|
core |
cluster¶
core¶
Methods¶
| Name | Description |
|---|---|
__repr__ |
__repr__¶
mbltmlCoreInfo_t¶
Per-core usage record returned by mbltmlGetCoreInfos().
Utilization for the core can be computed as npu_time / interval when interval is non-zero.
Parameters
core_id— Identifier of the core (mbltmlCoreId_t).npu_time— Accumulated NPU active time on the core, in microseconds.interval— Sampling interval covered bynpu_time, in microseconds.
Attributes¶
| Name | Description |
|---|---|
core_id |
|
npu_time |
|
interval |
core_id¶
npu_time¶
interval¶
Methods¶
| Name | Description |
|---|---|
__repr__ |
__repr__¶
mbltmlProcessInfo_t¶
Per-process usage record returned by mbltmlGetProcessInfos().
Utilization for the process can be computed as total_npu_time_us / total_interval_us when total_interval_us is non-zero.
Parameters
pid— Process ID.counts— Number of NPU samples attributed to the process.npu_memory_usage— Device memory currently used by the process, in bytes.total_interval_us— Total sampling interval, in microseconds.total_npu_time_us— Total NPU active time used by the process, in microseconds.
Attributes¶
| Name | Description |
|---|---|
pid |
|
counts |
|
npu_memory_usage |
|
total_interval_us |
|
total_npu_time_us |
pid¶
counts¶
npu_memory_usage¶
total_interval_us¶
total_npu_time_us¶
Methods¶
| Name | Description |
|---|---|
__repr__ |
__repr__¶
MBLTMLError¶
Base exception raised by the mbltml Python binding.
Wraps a non-success mbltmlStatusCode_t returned by the underlying C library. Instantiating MBLTMLError with a known status code yields the matching subclass (e.g., MBLTMLInvalidArgumentError).
Parameters
code— The mbltmlStatusCode_t value associated with this exception.
Methods¶
| Name | Description |
|---|---|
__new__ |
|
__str__ |
|
__eq__ |
__new__¶
__str__¶
__eq__¶
MBLTMLDriverNotFoundError¶
Raised when the required driver cannot be located.
Wraps MBLTML_DRIVER_NOT_FOUND.
MBLTMLInvalidArgumentError¶
Raised when one or more arguments are invalid.
Wraps MBLTML_INVALID_ARGUMENT. Typical causes include a NULL pointer or a dev_no that is out of range of the target device type's device count.
MBLTMLUninitializedError¶
Raised when an API is called before initialization.
Wraps MBLTML_UNINITIALIZED. Call mbltmlInit() first.
MBLTMLNotSupportedError¶
Raised when the feature is not supported on the target device.
Wraps MBLTML_NOT_SUPPORTED.
MBLTMLInsufficientLengthError¶
Raised when the output buffer is too small to hold the result.
Wraps MBLTML_INSUFFICIENT_LENGTH.
MBLTMLDeviceNotFoundError¶
Raised when the requested device cannot be located.
Wraps MBLTML_DEVICE_NOT_FOUND.
Functions¶
| Name | Description |
|---|---|
mbltmlInit |
Initialize the mbltml library. |
mbltmlShutdown |
Release all resources held by the mbltml library. |
mbltmlGetDeviceCount |
Get the total number of devices detected by the library. |
mbltmlGetTargetDeviceCount |
Get the number of detected devices of a specific target device type. |
mbltmlGetDriverVersion |
Get the driver version string for a specific driver. |
mbltmlGetDriverRevision |
Get the driver revision number for a specific driver. |
mbltmlGetNodeName |
Get the node name of a device. |
mbltmlGetDriverType |
Get the driver type of a device. |
mbltmlGetOnDeviceDriverVersion |
Get the on-device driver version string of a device. |
mbltmlGetOnDeviceDriverRevision |
Get the on-device driver revision number of a device. |
mbltmlGetFirmwareVersion |
Get the firmware version string of a device. |
mbltmlGetFirmwareRevision |
Get the firmware revision number of a device. |
mbltmlGetFirmwareCRC |
Get the CRC of the currently-loaded firmware image. |
mbltmlGetTemperature |
Get the current die temperature of a device. |
mbltmlGetSignalType |
Get the current signal-type indicator reported by the device. |
mbltmlGetNPUClock |
Get the current NPU clock frequency of a device. |
mbltmlGetBusClock |
Get the current bus clock frequency of a device. |
mbltmlGetFanDuty |
Get the current cooling-fan duty cycle of a device. |
mbltmlGetVendorId |
Get the PCIe vendor ID of a device. |
mbltmlGetDeviceId |
Get the PCIe device ID of a device. |
mbltmlGetSubVendorId |
Get the PCIe subsystem vendor ID of a device. |
mbltmlGetSubDeviceId |
Get the PCIe subsystem device ID of a device. |
mbltmlGetPcieGen |
Get the negotiated PCIe link generation of a device. |
mbltmlGetPcieLanes |
Get the negotiated PCIe link width (in lanes) of a device. |
mbltmlGetPcieRev |
Get the PCIe configuration-space revision ID of a device. |
mbltmlGetPcieClassCode |
Get the PCIe configuration-space class code of a device. |
mbltmlGetTotalPower |
Get the total instantaneous power consumption of a device (W). |
mbltmlGetTotalCurrent |
Get the total instantaneous current draw of a device (A). |
mbltmlGetTotalVoltage |
Get the total instantaneous supply voltage of a device (V). |
mbltmlGetExtraPmicPower |
Get the power consumption of the extra PMIC rail currently selected for the device (W). |
mbltmlGetExtraPmicCurrent |
Get the current of the extra PMIC rail currently selected for the device (A). |
mbltmlGetExtraPmicVoltage |
Get the voltage of the extra PMIC rail currently selected for the device (V). |
mbltmlGetExtraPmicId |
Get the extra PMIC rail currently selected for the device. |
mbltmlGetTotalUtilization |
Get the overall NPU utilization of a device. |
mbltmlGetMemoryUsage |
Get the amount of device memory currently in use. |
mbltmlGetMemoryTotal |
Get the total amount of device memory available. |
mbltmlGetProcessInfos |
Get per-process usage information for a device. |
mbltmlGetCoreInfos |
Get per-core usage information for a device. |
mbltmlSetExtraPmicID |
Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to. |
mbltmlInit¶
Initialize the mbltml library.
Throws
MBLTMLError— on failure.
mbltmlShutdown¶
Release all resources held by the mbltml library.
After this call, any further API usage requires re-initialization via mbltmlInit().
Throws
MBLTMLError— on failure.
mbltmlGetDeviceCount¶
Get the total number of devices detected by the library.
Note
Supported on all driver types.
This returns the number of all detected devices regardless of their target device type, including devices whose target device type could not be identified.
Attention
Do not confuse this with mbltmlGetTargetDeviceCount(). Since unidentified devices are not addressable by any (target_device_type, dev_no) pair, this count may exceed the sum over every mbltmlTargetDeviceType_t.
Returns
The number of devices detected.
Throws
MBLTMLError— on failure.
mbltmlGetTargetDeviceCount¶
Get the number of detected devices of a specific target device type.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type whose device count is queried.
Returns
The number of devices of target_device_type detected, or 0 if none is detected.
Throws
MBLTMLError— on failure.
mbltmlGetDriverVersion¶
Get the driver version string for a specific driver.
Note
Supported on all driver types.
Parameters
driver_type— Driver type whose driver version is queried.
Returns
The driver version string.
Throws
MBLTMLError— on failure.
mbltmlGetDriverRevision¶
Get the driver revision number for a specific driver.
Note
Supported on all driver types.
Parameters
driver_type— Driver type whose driver revision is queried.
Returns
The driver revision number.
Throws
MBLTMLError— on failure.
mbltmlGetNodeName¶
Get the node name of a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The node name string.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetDriverType¶
def mbltmlGetDriverType(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> mbltmlDriverType_t
Get the driver type of a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The mbltmlDriverType_t of the device.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetOnDeviceDriverVersion¶
def mbltmlGetOnDeviceDriverVersion(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> str
Get the on-device driver version string of a device.
Note
Supported on MBLTML_DRIVER_REGULUS_USB only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The on-device driver version string.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetOnDeviceDriverRevision¶
def mbltmlGetOnDeviceDriverRevision(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> int
Get the on-device driver revision number of a device.
Note
Supported on MBLTML_DRIVER_REGULUS_USB only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The on-device driver revision.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetFirmwareVersion¶
Get the firmware version string of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The firmware version string.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetFirmwareRevision¶
Get the firmware revision number of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The firmware revision.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetFirmwareCRC¶
Get the CRC of the currently-loaded firmware image.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The firmware CRC.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetTemperature¶
Get the current die temperature of a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The temperature reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetSignalType¶
Get the current signal-type indicator reported by the device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The signal-type value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetNPUClock¶
Get the current NPU clock frequency of a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The NPU clock value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetBusClock¶
Get the current bus clock frequency of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The bus clock value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetFanDuty¶
Get the current cooling-fan duty cycle of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The fan duty value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetVendorId¶
Get the PCIe vendor ID of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The vendor ID.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetDeviceId¶
Get the PCIe device ID of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The device ID.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetSubVendorId¶
Get the PCIe subsystem vendor ID of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The subsystem vendor ID.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetSubDeviceId¶
Get the PCIe subsystem device ID of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The subsystem device ID.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetPcieGen¶
Get the negotiated PCIe link generation of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The PCIe generation.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetPcieLanes¶
Get the negotiated PCIe link width (in lanes) of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The lane count.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetPcieRev¶
Get the PCIe configuration-space revision ID of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The revision value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetPcieClassCode¶
Get the PCIe configuration-space class code of a device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The class code.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetTotalPower¶
Get the total instantaneous power consumption of a device (W).
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The power reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetTotalCurrent¶
Get the total instantaneous current draw of a device (A).
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The current reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetTotalVoltage¶
Get the total instantaneous supply voltage of a device (V).
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The voltage reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetExtraPmicPower¶
Get the power consumption of the extra PMIC rail currently selected for the device (W).
Note
Supported on MBLTML_DRIVER_ARIES only.
The selected rail is controlled by mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The power reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetExtraPmicCurrent¶
Get the current of the extra PMIC rail currently selected for the device (A).
Note
Supported on MBLTML_DRIVER_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The current reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetExtraPmicVoltage¶
Get the voltage of the extra PMIC rail currently selected for the device (V).
Note
Supported on MBLTML_DRIVER_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The voltage reading.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetExtraPmicId¶
def mbltmlGetExtraPmicId(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> mbltmlExtraPmicId_t
Get the extra PMIC rail currently selected for the device.
Note
Supported on MBLTML_DRIVER_ARIES only.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The selected mbltmlExtraPmicId_t value.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetTotalUtilization¶
Get the overall NPU utilization of a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The utilization value (typically a ratio in [0.0, 1.0] or a percentage).
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetMemoryUsage¶
Get the amount of device memory currently in use.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The in-use memory in bytes.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetMemoryTotal¶
Get the total amount of device memory available.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
The total memory in bytes.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetProcessInfos¶
def mbltmlGetProcessInfos(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> List[mbltmlProcessInfo_t]
Get per-process usage information for a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
List of mbltmlProcessInfo_t records; empty if no process is running.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlGetCoreInfos¶
def mbltmlGetCoreInfos(
target_device_type: mbltmlTargetDeviceType_t, dev_no: int
) -> List[mbltmlCoreInfo_t]
Get per-core usage information for a device.
Note
Supported on all driver types.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().
Returns
List of mbltmlCoreInfo_t records.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.
mbltmlSetExtraPmicID¶
def mbltmlSetExtraPmicID(
target_device_type: mbltmlTargetDeviceType_t,
dev_no: int,
pmic_id: mbltmlExtraPmicId_t,
) -> None
Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to.
Note
Supported on aries-rb device (MBLTML_TARGET_DEVICE_ARIES_RB) only.
The underlying readings are refreshed by firmware once per second; allow up to 1 second after this call before mbltmlGetExtraPmicPower(), mbltmlGetExtraPmicCurrent() and mbltmlGetExtraPmicVoltage() reflect the newly selected rail.
Parameters
target_device_type— Target device type of the device.dev_no— Device index withintarget_device_type. Device count is obtained via mbltmlGetTargetDeviceCount().pmic_id— Identifier of the extra PMIC rail to select.
Throws
MBLTMLInvalidArgumentError— ifdev_nois out of range of thetarget_device_typedevice count.MBLTMLDeviceNotFoundError— if no device oftarget_device_typeis detected.MBLTMLError— on other failures.