aclrtDeviceGetP2PAtomicCapabilities
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Queries the support status for atomic operations between two devices in an AI server. An AI server is an umbrella term for a server consisting of multiple devices.
Prototype
1 | aclError aclrtDeviceGetP2PAtomicCapabilities(uint32_t* capabilities, const aclrtAtomicOperation* operations, const uint32_t count, int32_t srcDeviceId, int32_t dstDeviceId) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
capabilities |
Output |
Array of atomic operation capabilities. The array length is the same as the value of the count parameter. Each element in the array is a bitmask, where each bit represents whether atomic operations for a specific data type are supported. 1 indicates support and 0 indicates no support. For details about the type definition, see aclrtAtomicOperationCapability. |
operations |
Input |
Array of atomic operations to be queried. The array length is the same as the value of the count parameter. For details about the type definition, see aclrtAtomicOperation. |
count |
Input |
Number of atomic operations to be queried. The value must be the same as the length of the capabilities and operations arrays. Otherwise, undefined behavior may occur. |
srcDeviceId |
Input |
Device ID. The value must be in the range of [0, (Available device count – 1)]. Call aclrtGetDeviceCount to obtain the device count. |
dstDeviceId |
Input |
Device ID. The value must be in the range of [0, (Available device count – 1)]. Call aclrtGetDeviceCount to obtain the device count. |
Returns
0 on success; otherwise, failure. For details, see aclError.