aclrtDevicePeerAccessStatus

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function

Queries the data exchange status between two devices.

Prototype

1
aclError aclrtDevicePeerAccessStatus(int32_t deviceId, int32_t peerDeviceId, int32_t *status)

Parameters

Parameter

Input/Output

Description

deviceId

Input

Device ID.

The value must be in the range of [0, (Available device count – 1)]. Call aclrtGetDeviceCount to obtain the device count.

peerDeviceId

Input

Device ID.

The value must be in the range of [0, (Available device count – 1)]. Call aclrtGetDeviceCount to obtain the device count.

status

Output

Device status. 0 indicates that data exchange is disabled. 1 indicates that data exchange is enabled.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

This API can only be used to query the data exchange status of two devices whose IDs are within the value range. If any of the input device IDs is out of the range [0, Number of available devices – 1], the query result is 0 or the error code ACL_ERROR_RT_PARAM_INVALID is returned.