aclrtIpcMemSetAttr

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Description

Sets the attribute for IPC-based memory sharing.

Prototype

1
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. For details about the type definition, see aclrtIpcMemAttrType.

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)
  • ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_HCCS: HCCS channel

The macros are defined as follows:

#define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_SIO 0
#define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_HCCS 1

Returns

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