aclrtNotifySetImportPid

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

Sets the trustlist of processes that can share a Notify object.

This API must be used with other APIs to synchronize tasks between processes on multiple devices. For details, see aclrtNotifyGetExportKey.

Prototype

1
aclError aclrtNotifySetImportPid(aclrtNotify notify, int32_t *pid, size_t num)

Parameters

Parameter

Input/Output

Description

notify

Input

Notify object. For details about the type definition, see aclrtNotify.

The value must be the same as that of Notify in the aclrtNotifyGetExportKey API.

pid

Input

Array for storing trustlisted process IDs.

You can call aclrtDeviceGetBareTgid to obtain the process ID. In the Docker scenario, the process ID on the physical machine is returned. In non-Docker scenarios, the process ID is returned.

num

Input

Number of processes in the trustlist. The value must be the same as the size of the pid array.

Returns

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

Restrictions

This operation is not supported in the Ascend virtual instance scenario.