Ascend Device Plugin
使用约束
在安装MindCluster Ascend Device Plugin前,需要提前了解相关约束,具体说明请参见表1。
操作步骤
- 以root用户登录各计算节点,并执行以下命令查看镜像和版本号是否正确。
- 将软件包中的yaml文件拷贝到K8s管理节点上。请注意此处需使用适配具体处理器型号的yaml文件,并且为了避免自动识别MindCluster Ascend Docker Runtime功能出现异常,请勿修改yaml文件中DaemonSet.metadata.name字段,详见下表。
表2 MindCluster Ascend Device Plugin的yaml文件列表 yaml文件列表
说明
device-plugin-310-v{version}.yaml
推理服务器(插Atlas 300I 推理卡)上不使用MindCluster Volcano的配置文件。
device-plugin-310P-v{version}.yaml
Atlas 推理系列产品上不使用MindCluster Volcano的配置文件。
device-plugin-910-v{version}.yaml
Atlas 训练系列产品或Atlas A2 训练系列产品上不使用MindCluster Volcano的配置文件。
device-plugin-310P-1usoc-v{version}.yaml
Atlas 200I SoC A1 核心板上不使用MindCluster Volcano的配置文件。
device-plugin-volcano-v{version}.yaml
Atlas 训练系列产品或Atlas A2 训练系列产品上使用MindCluster Volcano的配置文件。
device-plugin-310-volcano-v{version}.yaml
推理服务器(插Atlas 300I 推理卡)上使用MindCluster Volcano的配置文件。
device-plugin-310P-volcano-v{version}.yaml
Atlas 推理系列产品上使用MindCluster Volcano的配置文件。
device-plugin-310P-1usoc-volcano-v{version}.yaml
Atlas 200I SoC A1 核心板上使用MindCluster Volcano的配置文件。
- 如不修改组件启动参数,可跳过本步骤。否则,根据实际情况修改MindCluster Ascend Device Plugin的启动参数。启动参数请参见表3,可执行./device-plugin -h查看参数说明。
- 在Atlas 200I SoC A1 核心板节点上,修改启动脚本“run_for_310P_1usoc.sh”中MindCluster Ascend Device Plugin的启动参数。修改完后需在所有Atlas 200I SoC A1 核心板节点上重新制作镜像,或者将本节点镜像重新制作后分发到其余所有Atlas 200I Soc A1 核心板节点。
如果不使用MindCluster Volcano作为调度器,在启动MindCluster Ascend Device Plugin的时候,需要修改“run_for_310P_1usoc.sh”中MindCluster Ascend Device Plugin的启动参数,将“-volcanoType”参数设置为false。
- 其他类型节点,修改对应启动yaml文件中MindCluster Ascend Device Plugin的启动参数。
- 在Atlas 200I SoC A1 核心板节点上,修改启动脚本“run_for_310P_1usoc.sh”中MindCluster Ascend Device Plugin的启动参数。修改完后需在所有Atlas 200I SoC A1 核心板节点上重新制作镜像,或者将本节点镜像重新制作后分发到其余所有Atlas 200I Soc A1 核心板节点。
- 在K8s管理节点上各yaml对应路径下执行以下命令,启动对应服务。
- K8s集群中存在使用推理服务器(插Atlas 300I 推理卡)的节点(MindCluster Ascend Device Plugin独立工作,不协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310-v{version}.yaml
- K8s集群中存在使用Atlas 推理系列产品的节点(MindCluster Ascend Device Plugin独立工作,不协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310P-v{version}.yaml
- K8s集群中存在使用Atlas A2 训练系列产品或Atlas 训练系列产品的节点(MindCluster Ascend Device Plugin独立工作,不协同MindCluster Volcano和MindCluster HCCL Controller使用)。
kubectl apply -f device-plugin-910-v{version}.yaml
- K8s集群中存在使用推理服务器(插Atlas 300I 推理卡)的节点(协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310-volcano-v{version}.yaml
- K8s集群中存在使用Atlas 推理系列产品的节点(协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310P-volcano-v{version}.yaml
- K8s集群中存在使用Atlas A2 训练系列产品或Atlas 训练系列产品的节点(协同MindCluster Volcano和MindCluster HCCL Controller使用)。
kubectl apply -f device-plugin-volcano-v{version}.yaml
- K8s集群中存在使用Atlas 200I SoC A1 核心板的节点(协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310P-1usoc-volcano-v{version}.yaml
- K8s集群中存在使用Atlas 200I SoC A1 核心板的节点(MindCluster Ascend Device Plugin独立工作,不协同MindCluster Volcano使用)。
kubectl apply -f device-plugin-310P-1usoc-v{version}.yaml
如果K8s集群使用了多种类型的昇腾AI处理器,请分别执行对应命令。
启动示例如下:
serviceaccount/ascend-device-plugin-sa created clusterrole.rbac.authorization.K8s.io/pods-node-ascend-device-plugin-role created clusterrolebinding.rbac.authorization.K8s.io/pods-node-ascend-device-plugin-rolebinding created daemonset.apps/ascend-device-plugin-daemonset created
执行kubectl get pod -n kube-system命令,出现Running表示组件启动成功。NAME READY STATUS RESTARTS AGE ... ascend-device-plugin-daemonset-d5ctz 1/1 Running 0 11s ...
- K8s集群中存在使用推理服务器(插Atlas 300I 推理卡)的节点(MindCluster Ascend Device Plugin独立工作,不协同MindCluster Volcano使用)。

- 安装组件后,组件的Pod状态不为Running,可参考组件Pod状态不为Running章节信息。
- 安装组件后,组件的Pod状态为ContainerCreating,可参考集群调度组件Pod处于ContainerCreating状态章节信息。
- 启动组件失败,可参考启动集群调度组件失败,日志打印“get sem errno =13”章节信息。
- 组件启动成功,找不到组件对应的Pod,可参考组件启动yaml执行成功,找不到组件对应的Pod章节信息。
参数说明
参数 |
类型 |
默认值 |
说明 |
---|---|---|---|
-fdFlag |
bool |
false |
边缘场景标志,是否使用FusionDirector系统来管理设备。 |
-shareDevCount |
uint |
1 |
共享设备特性开关,默认值为1,代表不开启共享。有效取值范围为[1, 100],仅支持以下设备,其余设备该参数无效,不影响组件正常启动。
|
-edgeLogFile |
string |
/var/alog/AtlasEdge_log/devicePlugin.log |
边缘场景日志文件。fdFlag设置为true时生效。 说明:
单个日志文件超过20 MB时会触发自动转储功能,文件大小上限不支持修改。 |
-useAscendDocker |
bool |
true |
默认为true,容器引擎是否使用MindCluster Ascend Docker Runtime。开启K8s的CPU绑核功能时,需要卸载MindCluster Ascend Docker Runtime并重启容器引擎。 说明:
MindX 5.0.RC1及以上版本只支持自动获取运行模式,不接受指定。 |
-use310PMixedInsert |
bool |
false |
是否使用Atlas 推理系列产品混插模式。 说明:
|
-volcanoType |
bool |
false |
是否使用MindCluster Volcano进行调度,当前已支持Atlas 训练系列产品、Atlas A2 训练系列产品、Atlas 推理系列产品和推理服务器(插Atlas 300I 推理卡)芯片。 |
-presetVirtualDevice |
bool |
true |
虚拟化实例功能开关。
|
-version |
bool |
false |
查看当前MindCluster Ascend Device Plugin的版本号。 |
-listWatchPeriod |
int |
5 |
设置健康状态检查周期,取值范围为[3,60],单位为秒。 |
-autoStowing |
bool |
true |
是否自动纳管已修复设备,volcanoType为true时生效。
说明:
设备故障后,会自动从K8s里面隔离。如果设备恢复正常,默认会自动加入K8s集群资源池。如果设备不稳定,可以设置为false,此时需要手动纳管。
|
-logLevel |
int |
0 |
日志级别:
|
-maxAge |
int |
7 |
日志备份时间限制,取值范围为[7, 700],单位为天。 |
-logFile |
string |
/var/log/mindx-dl/devicePlugin/devicePlugin.log |
非边缘场景日志文件。fdFlag设置为false时生效。 说明:
单个日志文件超过20 MB时会触发自动转储功能,文件大小上限不支持修改。转储后文件的命名格式为:devicePlugin-触发转储的时间.log,如:devicePlugin-2023-10-07T03-38-24.402.log。 |
-hotReset |
int |
-1 |
设备热复位功能参数。开启此功能,芯片发生故障后,会进行热复位操作,让芯片恢复健康。
该参数支持的训练设备:
该参数支持的推理设备:
说明:
针对Atlas 300I Duo 推理卡形态硬件,仅支持按卡复位,即两颗芯片会同时复位。 |
-linkdownTimeout |
int |
30 |
网络linkdown超时时间,单位秒;最小支持设置为1s,最大支持设置为30s。 说明:
该参数取值建议与用户在训练脚本中配置的HCCL_RDMA_TIMEOUT时间一致。如果是多任务,建议设置为多任务中HCCL_RDMA_TIMEOUT的最小值。 |
checkCachedPods |
bool |
true |
是否定期检查缓存中的Pod。默认取值为true,当缓存中的Pod超过1小时没有被更新,MindCluster Ascend Device Plugin将会主动请求api-server查看Pod情况。
|
-maxBackups |
int |
30 |
转储后日志文件保留个数上限,取值范围为(0,30],单位为个。 |
-h或者-help |
无 |
不涉及 |
显示帮助信息。 |