Function: get_device_utilization_rate

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Queries the usage of the Cube, Vector, and AI CPU on the device.

Prototype

Parameters

Parameter

Description

device_id

Int, device ID.

Must be in the range of [0, Device count – 1]. Call acl.rt.get_device_count to obtain the device count.

Return Values

Return Value

Description

utilization_info

Dict, usage information dictionary of the aclrtUtilizationInfo type. For details, see aclrtUtilizationInfo.

ret

Int, error code. 0 on success; else, failure.

Restrictions