--cluster_config
功能说明
指定目标部署环境逻辑拓扑关系的配置文件,用于生成hcom group和rankid信息。
只要原始大模型含有通信算子,无论是否分布式部署都需要配置该参数,否则通信算子执行时可能会报错。
关联参数
若模型中包含通信算子,或开启了算法切分(--enable_graph_parallel=1),该参数必填。
参数取值
参数值:逻辑拓扑文件的路径和文件名。
参数值格式:路径和文件名:支持大小写字母(a-z,A-Z)、数字(0-9)、下划线(_)、短横线(-)、句点(.)、中文汉字。
参数值约束:配置文件中的内容必须为json格式。
推荐配置及收益
无。
示例
将配置文件(文件名为举例为:numa_config.json)上传到ATC工具所在服务器,例如上传到$HOME/conf,使用示例如下:
atc --model=xxx.air --framework=1 --soc_version=<soc_version> --output=$HOME/out --cluster_config=$HOME/conf/numa_config.json 
逻辑拓扑文件示例如下:
- Atlas 推理系列产品场景:具体使用的device芯片数量为item_list*item_def。
{ "cluster": [{ "cluster_nodes": [{ //必填,Array of Cluster_node类型,集群资源信息描述。 "is_local": true, //非必填,BOOL类型,多个Node组成集群时,此文件此节点是否是本机。 "item_list": [{ //必填,Array of item_info类型,云资源管理编排的执行该JOB的加速卡。 "item_id": 0 //必填,Integer类型,Node内加速卡id。 }], "node_id": 0, //必填,Integer类型,集群内节点编号,一般0作为主节点。 "node_type": "ATLAS300" //必填,String类型,节点类型,如ATLAS800。 }] }], "item_def": [{ //Node内同种类型的加速卡的公共属性。 "device_list": [{ //非必填,Array of device_info类型,整芯片内包含几个物理device。Atlas 训练系列产品不需要填写该配置项。 "device_id": 0 //必填,Integer类型,整芯片内物理device id。 }, { "device_id": 1 }], "item_type": "<soc_version>" //必填,String类型,节点内加速卡类型。 }] } - Atlas 训练系列产品和Atlas A2训练系列产品/Atlas 800I A2推理产品场景:具体使用的device芯片数量为cluster_nodes*item_list个数,每个cluster_nodes中的item_id个数必须保持一致。
4p逻辑网络config: { "cluster": [{ "cluster_nodes": [{ "node_id": 0, "node_type": "ATLAS800", "ipaddr": "127.0.0.1", //必填,String类型,节点控制面通信的IP,如训练服务器为HOST IP、SOC服务器为头节点IP。 "port": 2509, //必填,Integer类型,节点控制面通信的端口。 "is_local": true, "item_list": [{ "item_id": 0 }, { "item_id": 1 }, { "item_id": 2 }, { "item_id": 3 }] }] }], "item_def": [{ "item_type": "<soc_version>" }], "node_def": [{ //集群内同种类型Node的公共属性。 "item": [{ "item_type": "<soc_version>" //必填,String类型,节点内加速卡类型。 }] }] } 
参数解释如下:
参数  | 
类型  | 
是否必填  | 
描述  | 
|||
|---|---|---|---|---|---|---|
cluster  | 
-  | 
集群配置。  | 
||||
cluster_nodes  | 
-  | 
Array of Cluster_node  | 
是  | 
集群资源信息描述。  | 
||
node_id  | 
-  | 
Integer  | 
是  | 
集群内节点编号,一般0作为主节点。  | 
||
node_type  | 
-  | 
String  | 
是  | 
节点类型,如ATLAS800。  | 
||
ipaddr  | 
-  | 
String  | 
是  | 
节点控制面通信的IP,如训练服务器为HOST IP、SOC服务器为头节点IP。  | 
||
port  | 
-  | 
Integer  | 
是  | 
节点控制面通信的端口。  | 
||
is_local  | 
-  | 
BOOL  | 
否  | 
多个Node组成集群时,此文件此节点是否是本机。  | 
||
item_list  | 
-  | 
Array of item_info  | 
是  | 
云资源管理编排的执行该JOB的加速卡。  | 
||
-  | 
item_id  | 
Integer  | 
是  | 
Node内加速卡id。  | 
||
item_def  | 
-  | 
Node内同种类型的加速卡的公共属性。  | 
||||
device_list  | 
-  | 
Array of device_info  | 
否  | 
整芯片内包含几个物理device。Atlas 训练系列产品不需要填写该配置项。  | 
||
device_id  | 
-  | 
Integer  | 
是  | 
整芯片内物理device id。  | 
||
item_type  | 
-  | 
-  | 
String  | 
是  | 
节点内加速卡类型。  | 
|
node_def  | 
-  | 
集群内同种类型Node的公共属性。  | 
||||
item  | 
item_type  | 
-  | 
String  | 
是  | 
节点内加速卡类型。  | 
|
支持的型号
Atlas 推理系列产品
Atlas 训练系列产品
Atlas A2训练系列产品/Atlas 800I A2推理产品
依赖约束
无。