---
title: aclrtIpcMemSetAttr
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_2013.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_2013.html
indexId: cf02dcce6bb24573603eae232d3d94921f2af32395170653cae3a7e96826107b68
---
# aclrtIpcMemSetAttr

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | ☓ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | ☓ |
| Atlas 200I/500 A2 推理产品 | ☓ |
| Atlas 推理系列产品 | ☓ |
| Atlas 训练系列产品 | ☓ |


#### 功能说明

设置IPC共享内存的属性信息。


#### 函数原型

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


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| key | 输入 | 共享内存key。 必须先调用aclrtIpcMemGetExportKey接口获取共享内存key，再作为入参传入。 |
| type | 输入 | 内存映射类型。类型定义请参见aclrtIpcMemAttrType。 当前支持配置为ACL\_RT\_IPC\_MEM\_ATTR\_ACCESS\_LINK，用于在跨片访问时，指定双die之间是SIO（serial input/output）通道、还是HCCS（Huawei Cache Coherence System）通道。 |
| attr | 输入 | 属性。 当前支持设置为如下宏： ACL\_RT\_IPC\_MEM\_ATTR\_ACCESS\_LINK\_SIO：SIO通道，默认该选项 ACL\_RT\_IPC\_MEM\_ATTR\_ACCESS\_LINK\_HCCS：HCCS通道 宏的定义如下： \#define ACL\_RT\_IPC\_MEM\_ATTR\_ACCESS\_LINK\_SIO 0 \#define ACL\_RT\_IPC\_MEM\_ATTR\_ACCESS\_LINK\_HCCS 1 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
