aclrtIpcMemSetAttr

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

Sets the attribute for IPC-based memory sharing.

Prototype

aclError aclrtIpcMemSetAttr(const char *key, aclrtIpcMemAttrType type, uint64_t attr)

Parameters

Parameter

Input/Output

Description

key

Input

Key of the shared memory.

First call aclrtIpcMemGetExportKey to obtain the shared memory key and then pass it as an input.

type

Input

Memory mapping type. Currently, the value can be ACL_RT_IPC_MEM_ATTR_ACCESS_LINK to specify whether the serial input/output (SIO) channel or Huawei Cache Coherence System (HCCS) channel is used between two dies during cross-chip access.

attr

Input

Attribute.

The following macros are supported:

  • ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_SIO: SIO channel (default)
    #define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_SIO 0
  • ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_HCCS: HCCS channel
    #define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_HCCS 1

Returns

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