Function: query_device_status
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the device status (normal or abnormal).
Prototype
- C Prototype
1aclError aclrtQueryDeviceStatus(int32_t deviceId, aclrtDeviceStatus *deviceStatus)
- Python Function
1device_status, ret = acl.rt.query_device_status(device_id)
Parameter Description
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 Value Description
Return Value |
Description |
|---|---|
device_status |
Int, device status. For details, see aclrtDeviceStatus. |
ret |
Int, error code: 0 on success; else, failure. |
Parent topic: Device Management