aclrtGetDeviceUtilizationRate
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Queries the usage of the Cube, Vector, and AI CPU on the device.
Prototype
aclError aclrtGetDeviceUtilizationRate(int32_t deviceId, aclrtUtilizationInfo *utilizationInfo)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
deviceId |
Input |
Device ID. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
utilizationInfo |
Output |
Pointer to the usage information structure. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
- Querying the memory usage of a device is a reserved function and is not supported in the current version. If this API is called to query the memory usage, the returned value is -1.
- For products that do not have the vector, when this API is called to query the vector usage, the returned value is -1.
Atlas training products - In the Ascend virtual instance scenario, this API cannot be called to query the usage, and the returned value has no meaning.
- When profiling is enabled, this API cannot be called to query the usage, and the returned value has no meaning.
Parent topic: Device Management