Function: ipc_mem_close

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

x

Function Usage

Disables IPC-based memory sharing. Processes that call both acl.rt.ipc_mem_import_by_key and acl.rt.ipc_mem_get_export_key also need to call this API. For the same shared memory key, all processes calling acl.rt.ipc_mem_import_by_key must complete the acl.rt.ipc_mem_close call before any process calling acl.rt.ipc_mem_get_export_key can call acl.rt.ipc_mem_close. Failure to follow this sequence may cause errors. This API must work with other APIs to implement memory sharing. For details, see the description of acl.rt.ipc_mem_get_export_key.

Prototype

  • C Prototype
    aclError aclrtIpcMemClose(const char *key)
  • Python Function
    1
    ret = acl.rt.ipc_mem_close(key)
    

Parameter Description

Parameter

Description

key

Str, shared memory key, which is obtained by calling acl.rt.ipc_mem_get_export_key.

Return Value Description

Return Value

Description

ret

Int, 0 on success; else failure.