---
title: numa_config.json配置
description: "numa_config.json全量字段含义如表1所示。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/dfdevc_23_0032.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/dfdevc_23_0032.html
indexId: 244310f99e98dd1df6c64c3f5a038b85678423c7047375ac23fc0de72ee2129169
---
# numa_config.json配置

numa_config.json全量字段含义如表1所示。


**表1 字段说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| Cluster | Cluster | Cluster | Cluster |
| cluster\_nodes | Array of cluster\_node Cluster\_node详细介绍请参见表2。 | 是 | 集群资源信息描述。 |
| nodes\_topology | nodes\_topology nodes\_topology详细介绍请参见表5。 | 否 | 跨节点通信拓扑。 如两台AISERVER间参数面通信拓扑。 |
| node\_def：集群内同种类型node的公共属性 | node\_def：集群内同种类型node的公共属性 | node\_def：集群内同种类型node的公共属性 | node\_def：集群内同种类型node的公共属性 |
| node\_type | String | 是 | 节点类型。示例如下。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景下：ATLAS900。 |
| resource\_type | String | 是 | UDF可部署的架构和CPU资源类型。取值为X86或者Aarch。 |
| support\_links | String | 是 | 节点内通信方式。 如[HCCS,PCIE,ROCE]。 |
| item\_type | String | 是 | 节点内加速卡类型。示例如下。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景：AscendxxxB1、AscendxxxB2、AscendxxxB3、AscendxxxB4。 Atlas A3 训练系列产品 / Atlas A3 推理系列产品 场景：Ascend910\_xx |
| inter\_item\_memory\_access\_mode | String | 是 | Server内不同device的地址互访方式。 取值范围：NUMA或者UMA。 |
| h2d\_bw | String | 否 | HOST\-DEVICE间带宽如PCIE:100Gb。 |
| item\_topology | item\_topology item\_topology详细信息请参见表6。 | 否 | 节点内不同加速卡间互联信息。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 云场景下，按照1/2/4/8卡发放加速卡，故若只有1张卡则不涉及多卡拓扑。 |
| item\_def：node内同种类型的加速卡的公共属性 | item\_def：node内同种类型的加速卡的公共属性 | item\_def：node内同种类型的加速卡的公共属性 | item\_def：node内同种类型的加速卡的公共属性 |
| item\_type | String | 是 | 节点内加速卡类型。示例如下。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景：AscendxxxB1、AscendxxxB2、AscendxxxB3、AscendxxxB4。 |
| memory | String | 是 | 整芯片总内存。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景下，请配置为[DDR:64GB]。 Atlas A3 训练系列产品 / Atlas A3 推理系列产品 场景下，请配置为[DDR:31GB]。 |
| aic\_type | String | 是 | 加速卡计算核类型和核数。 如[DAVINCI\_V100:32]。 |
| resource\_type | String | 是 | UDF可部署的Ascend资源类型。请配置为Ascend。 |
| links\_mode | String | 否 | 芯片内互联拓扑。 |
| device\_list | Array of device\_info device\_info详细信息请参见表9。 | 否 | 整芯片内包含物理device信息。 |


**表2 cluster_node说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| node\_id | Integer | 是 | 集群内节点编号，一般0作为主节点。 |
| node\_type | String | 是 | 节点类型。示例如下。 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景下：ATLAS900。 |
| ipaddr | String | 是 | 节点控制面通信的IP。 如训练服务器为HOST IP。 |
| port | Integer | 是 | 节点控制面通信的端口。 |
| data\_panel | NetworkInfo | 否 | 数据面通信信息。 |
| memory | Integer | 否 | 应用HOST上可用内存。 |
| is\_local | BOOL | 否 | 多个Node组成集群时，此文件此节点是否是本机。 |
| auth\_lib\_path | String | 否 | 用来标识DataFlow需要dlopen的库文件：auth\_lib\_path字段由云助端CaaS写入，主从调度进程负责读取并加载so和调用相关接口。 |
| deploy\_res\_path | String | 否 | 模型文件存放路径。 root用户默认路径：/root/runtime/deploy\_res。 非root用户默认路径：${home}/runtime/deploy\_res。 |
| item\_list | Array of item\_info item\_info详细信息请参见表4。 | 是 | 云资源管理编排的执行该JOB的加速卡。 |


**表3 NetworkInfo说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| avail\_ports | Array of String | 否 | 在每个节点上该应用实例可用的数据面通信端口号范围。承载的业务如下。 FlowGW异步点到点通信：HOST FlowGW和Device FlowGW通信走PCIE，不会占用HOST OS端口号；Device间FlowGW通信需要为通信分配唯一的端口号。 集合通信：send/recv入图点到点、ranktbl集合通信。 多个Device间FlowGW通信支持协议RDMA。 多个Device间端口号默认分配范围为16666~32767，用户可自定义配置。 |


**表4 Item_info说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| item\_id | Integer | 是 | Node内加速卡逻辑ID。 |
| device\_id | Integer | 是 | Node内加速卡物理ID。 |
| ipaddr | String | 否 | 通信使用的IP地址或网段信息。 |


**表5 nodes_topology说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| type | String | 是 | 通信库根据拓扑类型来确定选择的通信算法。 如star。 |
| protocol | String | 否 | Node间通信协议类型，默认值为RDMA。 单Server不需要配置该字段。 示例：RDMA:200Gb。 |
| topos | Array of plane plane详细信息请参考表8 | 是 | Node间加速卡互联平面信息。 |


**表6 item_topology说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| links\_mode | String | 是 | 节点内不同加速卡间通信方式和带宽。 如HCCS:128Gb。 |
| links | Array of item\_pair item\_pair详细信息请参见表7。 | 是 | 节点内不同加速卡间互联拓扑。 如[0, 1]。 |


**表7 item_pair说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| item\_id | Integer | 是 | 加速卡ID。 |
| pair\_item\_id | Integer | 是 | 成对的加速卡ID。 |


**表8 plane说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| plane\_id | Integer | 是 | server间通信平面是第几个plane(云提供)。 |
| devices | Array of int list | 是 | 属于该平面的加速卡列表。 |


**表9 device_info说明**

| 名称 | 类型 | 是否必选 | 描述 |
| --- | --- | --- | --- |
| device\_id | Integer | 是 | 整芯片内物理device ID。 |


#### Atlas A2 训练系列产品 / Atlas A2 推理系列产品 场景下的numa_config.json示例

numa_config.json示例如下，全量字段含义如表1所示。

```
{
"cluster":[
{
"cluster_nodes": [
{
"node_id":0,
"node_type": "ATLAS900",
"ipaddr": "xx.xx.xx.xx",
"port":2509,
"memory":25165824,
"is_local":true,
"auth_lib_path": "/opt/huawei/config/ascend_config/dataflow/lib/libcaas_dataflow_auth.so",
"deploy_res_path": "/home/",
"item_list" : [
{
"item_id":0,
"device_id":0,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":1,
"device_id":1,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":2,
"device_id":2,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":3,
"device_id":3,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":4,
"device_id":4,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":5,
"device_id":5,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":6,
"device_id":6,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":7,
"device_id":7,
"ipaddr":"xx.xx.xx.xx"
}
]
}
],
"nodes_topology":
{
"protocol": "RDMA:200Gb",
"type" : "star",
"topos" : [
{
"plane_id" : 0,
"devices" : [0, 1, 2, 3, 4, 5, 6, 7]
},
]
}
}
],
"node_def": [
{
"node_type": "ATLAS900" ,
"resource_type": "Aarch",
"support_links": "[HCCS,PCIE,ROCE]" ,
"item_type": "Ascend
xxx
B1",
"inter_item_memory_access_mode": "[NUMA]",
"h2d_bw": "PCIE:100Gb",
"item_topology": [
{
"links_mode": "HCCS",
"links": [ [0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],
[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],
[2,3],[2,4],[2,5],[2,6],[2,7],
[3,4],[3,5],[3,6],[3,7],
[4,5],[4,6],[4,7],
[5,6],[5,7],
[6,7]]
}
]
}
],
"item_def": [
{
"item_type": "Ascend
xxx
B1",
"resource_type": "Ascend",
"memory": "[DDR:64GB]",
"aic_type": "[DAVINCI_V100:32]"
}
]
}
```


#### Atlas A3 训练系列产品 / Atlas A3 推理系列产品 场景下的numa_config.json示例

numa_config.json示例如下，全量字段含义如表1所示。

```
{
"cluster":[
{
"cluster_nodes": [
{
"node_id":0,
"node_type": "ATLAS800",
"ipaddr": "xx.xx.xx.xx",
"port":2509,
"memory":25165824,
"is_local":true,
"auth_lib_path": "/opt/huawei/config/ascend_config/dataflow/lib/libcaas_dataflow_auth.so",
"deploy_res_path": "/home/",
"item_list" : [
{
"item_id":0,
"device_id":0,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":1,
"device_id":1,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":2,
"device_id":2,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":3,
"device_id":3,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":4,
"device_id":4,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":5,
"device_id":5,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":6,
"device_id":6,
"ipaddr":"xx.xx.xx.xx"
},
{
"item_id":7,
"device_id":7,
"ipaddr":"xx.xx.xx.xx"
}
]
}
],
"nodes_topology":
{
"protocol": "RDMA:200Gb",
"type" : "star",
"topos" : [
{
"plane_id" : 0,
"devices" : [0, 1, 2, 3, 4, 5, 6, 7]
},
]
}
}
],
"node_def": [
{
"node_type": "ATLAS900" ,
"resource_type": "Aarch",
"support_links": "[HCCS,PCIE,ROCE]" ,
"item_type": "Ascend
xxx
B1",
"inter_item_memory_access_mode": "[NUMA]",
"h2d_bw": "PCIE:100Gb",
"item_topology": [
{
"links_mode": "HCCS",
"links": [ [0,1],[0,2],[0,3],[0,4],[0,5],[0,6],[0,7],
[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],
[2,3],[2,4],[2,5],[2,6],[2,7],
[3,4],[3,5],[3,6],[3,7],
[4,5],[4,6],[4,7],
[5,6],[5,7],
[6,7]]
}
]
}
],
"item_def": [
{
"item_type": "Ascend910
_xx
",
"resource_type": "Ascend",
"memory": "[DDR:31GB]",
"aic_type": "[DAVINCI_V100:32]"
}
]
}
```
