aclrtIpcMemClose

Applicability

Product

Supported

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

√

Description

Disables IPC-based memory sharing. Processes that call both aclrtIpcMemImportByKey and aclrtIpcMemGetExportKey also need to call this API.

For the same shared memory key, the aclrtIpcMemClose API can be called in processes that call aclrtIpcMemGetExportKey only after being called in all processes that call the aclrtIpcMemImportByKey. Otherwise, exceptions may occur.

This API must work with other APIs to implement memory sharing. For details, see the description of aclrtIpcMemGetExportKey.

Prototype

aclError aclrtIpcMemClose(const char *key)

Parameters

Parameter

Input/Output

Description

key

Input

Shared memory key obtained by calling aclrtIpcMemGetExportKey.

Returns

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