aclrtIpcMemClose

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

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, only after all processes that call aclrtIpcMemImportByKey have called aclrtIpcMemClose, all processes that call aclrtIpcMemGetExportKey can call aclrtIpcMemClose. Otherwise, exceptions may occur.

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

Prototype

1
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.

API Call Example

For the API call example, see Interprocess communication.