Deploying MindIE Motor

The steps are described as follows:
The cluster scheduling components periodically report node and chip information.
kubelet reports the number of node chips to the node object.
Ascend Device Plugin reports chip memory and topology information.
For chips with on-chip memory, Ascend Device Plugin reports the chip memory status upon startup, as described in the node-label description; reports the full NPU information, writing the physical ID of the chip to
device-info-cm; the total number of allocatable le chips, the number of allocated chips, and basic chip information (device ip and super_device_ip) are reported to the node for full NPU scheduling.When a fault exists on a node, NodeD periodically reports the node health status and node hardware fault information to
node-info-cm, and reports shared storage fault information to the public faults of ClusterD.
After reading the information in
device-info-cm,node-info-cm, and the public faults, ClusterD writes the information intocluster-info-cm.The user submits MS Controller, MS Coordinator tasks that do not use NPUs, and several MindIE Server tasks that use NPUs, through kubectl or other deep learning platforms.
Ascend Operator creates the corresponding podGroup for the tasks. For detailed information about podGroup, refer to the official open-source Volcano documentation.
Ascend Operator creates the corresponding Pods for the tasks and injects the environment variables required for starting the MindIE Server service. For detailed information about environment variables, see Environment Variables Injected by Ascend Operator.
For MS Controller and MS Coordinator tasks, volcano-scheduler selects appropriate nodes based on node memory, CPU, labels, and affinity. For MindIE Server tasks, volcano-scheduler also references chip topology information to select appropriate nodes, and writes the selected chip information and node hardware information into the Pod's annotations.
When kubelet creates containers, for MindIE Server tasks, it calls Ascend Device Plugin to mount chips. Ascend Device Plugin or volcano-scheduler writes chip and node hardware information into the Pod's annotations. Ascend Docker Runtime assists in mounting the corresponding resources.
Ascend Operator reads the annotation information of each MindIE Server task Pod, generates their respective collective communication file
hccl.json, and stores it in etcd in the form of a ConfigMap.ClusterD listens for changes in MS Controller and MS Coordinator task Pod information, as well as changes in the ConfigMaps corresponding to each
hccl.json, and generates theglobal-ranktablein real time. For a detailed description of theglobal-ranktable, see the "global-ranktable File Description" section in SubscribeRankTable.After MS Controller starts, it establishes communication with ClusterD and subscribes to changes in the
global-ranktablethrough the gRPC interface.
If the user has not configured the RoCE network:
- In non-SuperPoD scheduling scenarios, single-server inference instances can be scheduled normally, but KV transmission between inference instances may be abnormal, causing the inference job to fail to run normally.
- In SuperPoD scheduling scenarios, if the number of logical SuperPoDs for the inference instance is 1, the inference instance can be scheduled normally, but KV transmission between inference instances may be abnormal, causing the inference job to fail to run normally.
Process Description
MindIE Motor consists of two parts: MindIE MS (MindIE Management Service) and MindIE Server. MindIE MS includes MS Controller and MS Coordinator, while MindIE Server can be divided into Prefill instances and Decode instances. MS Controller and MS Coordinator do not require NPU resources, whereas MindIE Server requires NPU resources.
The MindCluster cluster scheduling components support running MS Controller, MS Coordinator, and MindIE Server in independent Pods. When using the MindCluster cluster scheduling components for MindIE Motor task deployment, MS Controller, MS Coordinator, and each instance in MindIE Server are deployed as an AscendJob respectively. For example, if an inference job contains two Prefill instances and one Decode instance, five AscendJobs need to be deployed.
For detailed instructions on Prefill-Decode disaggregation deployment, refer to the "Cluster Service Deployment > Prefill-Decode Disaggregation Deployment" section in the MindIE Motor Development Guide.
The figure below shows the process of deploying MindIE Motor inference jobs using the MindCluster cluster scheduling components via the command line.
Preparing a Job YAML
Prepare for image creation as required, select a YAML file, and modify the YAML file.
The image preparation has been completed.
Various YAML examples are provided for cluster scheduling. You can select an appropriate YAML example based on the used component, processor type, and job type, and make necessary modifications according to actual requirements before using it.
| Type | Hardware Model | YAML Name | Obtain Link |
|---|---|---|---|
| MS Controller | - | controller.yaml | YAML |
| MS Coordinator | - | coordinator.yaml | YAML |
| MindIE Server | Atlas 800I A2 Inference Server Atlas 800I A3 SuperPoD Server | server.yaml | YAML |
If the device used is an Atlas 800I A3 SuperPoD server, after obtaining the YAML, refer to the example below to modify some parameters.
Compared with a common AscendJob, the MindIE Motor inference job requires the two additional labels: app and jobID. MindIE Server requires NPUs. Ensure that the number of AscendJobs delivered matches the number of prefill instances and decode instances.
For example, if a MindIE Motor inference job contains one MS Controller instance, one MS Coordinator instance, x prefill instances, and y decode instances, the number of AscendJobs to be deployed is 1 + 1 + x + y.
MS Controller and MS Coordinator do not require NPUs and are each deployed as an AscendJob, supporting multiple replicas. The YAML examples for MS Controller and MS Coordinator are as follows.
apiVersion: mindxdl.gitee.com/v1 kind: AscendJob metadata: name: mindie-ms-test-controller namespace: mindie labels: framework: pytorch app: mindie-ms-controller # Indicates the role of MindIE Motor in the Ascend Job task, non-modifiable jobID: mindie-ms-test # Unique identification ID of the current MindIE Motor task in the cluster, configurable by the user based on actual conditions ring-controller.atlas: ascend-910b spec: schedulerName: volcano # Scheduler selected when Ascend Operator enables "gang" scheduling runPolicy: schedulingPolicy: # This field only takes effect when Ascend Operator enables "gang" scheduling and the scheduler is Volcano minAvailable: 1 # Total replica count for task running queue: default successPolicy: AllWorkers replicaSpecs: Master: replicas: 1 restartPolicy: Always template: metadata: ...
app and jobID are described as follows. For detailed descriptions of other parameters, see YAML Parameter Description.
app: role of MindIE Motor in the AscendJob. Values include mindie-ms-controller, mindie-ms-coordinator, and mindie-ms-server.
jobID: unique ID of the MindIE Motor job in the cluster. You can configure the ID as required.
YAML example for MindIE Server
apiVersion: v1 kind: ConfigMap metadata: name: rings-config-mindie-server-0 # The name must be identical to the name attribute of the following AscendJob. The prefix "rings-config-" is non-modifiable. namespace: mindie labels: jobID: mindie-ms-test ring-controller.atlas: ascend-910b mx-consumer-cim: "true" data: hccl.json: | { "status":"initializing" } apiVersion: mindxdl.gitee.com/v1 kind: AscendJob metadata: name: mindie-server-0 namespace: mindie labels: framework: pytorch app: mindie-ms-server # Indicates the role of the current MindIE Motor in the Ascend Job task, non-modifiable jobID: mindie-ms-test # The unique identification ID of the current MindIE Motor task in the cluster. Users can configure it based on actual conditions. ring-controller.atlas: ascend-910b annotations: huawei.com/schedule.filter.faultCode: "8C1F8608,4C1F8608,80E01801" # Add this annotation. For the configuration method, see YAML Parameter Description. huawei.com/schedule.filter.faultLevel: "RestartRequest" # Add this annotation. For the configuration method, see YAML Parameter Description. spec: schedulerName: volcano # The scheduler selected when Ascend Operator enables "gang" scheduling runPolicy: schedulingPolicy: # This field only takes effect when Ascend Operator enables "gang" scheduling and the scheduler is Volcano minAvailable: 2 # Total replica count for task running queue: default successPolicy: AllWorkers replicaSpecs: Master:For the Atlas 800I A3 SuperPoD Server, the YAML for MindIE Server requires the following modifications:
apiVersion: mindxdl.gitee.com/v1 kind: AscendJob metadata: name: mindie-server-0 namespace: mindie labels: framework: pytorch app: mindie-ms-server # Non-modifiable jobID: mindie-ms-test # Unique identification ID of the MindIE Motor job in the cluster. Users can configure it based on actual conditions. ring-controller.atlas: ascend-910b fault-scheduling: force annotations: sp-block: "16" # Add this annotation. For the configuration method, see YAML Parameter Description. huawei.com/schedule_policy: "chip2-node16" # Set the scheduling policy based on the hardware form huawei.com/schedule.filter.faultCode: "8C1F8608,4C1F8608,80E01801" # Add this annotation. For the configuration method, see YAML Parameter Description. huawei.com/schedule.filter.faultLevel: "RestartRequest" # Add this annotation. For the configuration method, see YAML Parameter Description. spec: schedulerName: volcano # Volcano selected when Ascend Operator enables "gang" scheduling runPolicy: schedulingPolicy: # This field only takes effect when Ascend Operator enables "gang" scheduling and the scheduler is Volcano minAvailable: 2 # Total replica count for job running queue: default successPolicy: AllWorkers replicaSpecs: Master: replicas: 1 restartPolicy: Always template: metadata: labels: ring-controller.atlas: ascend-910b app: mindie-ms-server jobID: mindie-ms-test spec: nodeSelector: accelerator: huawei-Ascend910
(Optional) Configuring Instance-Level Affinity Scheduling
For the Atlas 800I A3 SuperPoD Server, MindCluster cluster scheduling components support job-level affinity scheduling for MindIE Motor inference jobs. That is, MindIE Server instances can be scheduled to the same physical SuperPoD as much as possible, fully utilizing the HCCS network and accelerating network communication between instances.
For detailed instructions on affinity scheduling rules for logical SuperPoDs, see the UnifiedBus Device Network Description section.
Figure 1 UnifiedBus device network

Configuring Instance-Level Affinity Scheduling
After image preparation is finished, if instance-level affinity scheduling policies are required for MindIE Motor inference jobs during Preparing a Job YAML, perform the following operations simultaneously.
Specify the
sp-blockfield in the job YAML. The value ofsp-blockmust be consistent with the chip quantity to ensure that the entire job is scheduled to a single physical SuperPoD.Ensure that there are reserved nodes in a physical SuperPoD for MindIE Server instance scheduling.
When
sp-fitis set toidlest, MindIE Server instances are scheduled to a more idle physical SuperPoD.When
podAffinityis set, MindIE Server instances are scheduled to a physical SuperPoD with more affinity pods.
The YAML example is as follows:
apiVersion: mindxdl.gitee.com/v1
kind: AscendJob
metadata:
name: mindie-server-0
namespace: mindie
labels:
framework: pytorch
app: mindie-ms-server # Role of MindIE Motor in AscendJob, non-modifiable
jobID: mindie-ms-test # Unique identification ID of the current MindIE Motor job in the cluster, configurable by the user based on actual conditions
ring-controller.atlas: ascend-910b
fault-scheduling: force
annotations:
sp-block: "16" # Specifies the sp-block field. The cluster scheduling components will divide logical SuperPoDs based on the partitioning strategy on top of the physical SuperPoD for affinity scheduling of training jobs.
sp-fit: "idlest" # SuperPoD scheduling policy. For detailed description, see YAML Parameter Description.
huawei.com/schedule_policy: "chip2-node16" # Sets the scheduling policy based on the hardware form.
spec:
schedulerName: volcano # Volcano selected when Ascend Operator enables "gang" scheduling
runPolicy:
schedulingPolicy: # This field only takes effect when Ascend Operator enables "gang" scheduling and the scheduler is Volcano
minAvailable: 2 # Total replica count for job running
queue: default
successPolicy: AllWorkers
replicaSpecs:
Master:
restartPolicy: Never
template:
metadata:
labels:
ring-controller.atlas: ascend-910b
spec:
affinity:
podAffinity: # Indicates that the logical SuperPoD will be scheduled to the physical SuperPoD with more affinity pods
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 # Non-modifiable
podAffinityTerm:
labelSelector:
matchLabels:
jobID: mindie-ms-test # Label required for affinity pods
topologyKey: kubernetes.io/hostname
YAML Parameter Description
The following table describes the YAML parameters in the AscendJob.
Table 1 YAML parameters
| Parameter | Value | Description |
|---|---|---|
| framework |
| - |
| jobID | Unique identification ID of the current MindIE Motor inference job in the cluster.Configure it based on actual conditions. | This parameter is only supported on Atlas 800I A2 inference servers and Atlas 800I A3 SuperPoD servers. |
| app | Role of the current MindIE Motor inference job in the AscendJob. Values include mindie-ms-controller, mindie-ms-coordinator, and mindie-ms-server. |
|
| mx-consumer-cim | Marks whether this ConfigMap will be listened to by ClusterD. true: Yes | - |
| mind-cluster/scaling-rule | Marks the ConfigMap name corresponding to the scaling rule. | Only supported for MindIE Motor inference jobs to use this parameter on Atlas 800I A2 inference servers and Atlas 800I A3 SuperPoD servers. |
| mind-cluster/group-name | Marks the corresponding group name in the scaling rule. | Only supported for MindIE Motor inference jobs to use this parameter on Atlas 800I A2 inference servers and Atlas 800I A3 SuperPoD servers. |
| podAffinity | Indicates that the logical SuperPoD will be scheduled to the physical SuperPoD with more affinity pods. | Only supported for MindIE Motor inference jobs to use this parameter on Atlas 800I A3 SuperPoD servers. |
| sp-fit | Super node scheduling policy.
| Only supported for MindIE Motor inference jobs to use this parameter on Atlas 800I A3 SuperPoD servers. |
| ring-controller.atlas |
| Identifies the product type of the chip used by the job. It needs to be configured in the ConfigMap and the job. |
| schedulerName | Default value is "volcano". Fill in according to the actual situation. | Scheduler selected when Ascend Operator enables "gang" scheduling. |
| minAvailable | Default value is the total replica count of the job. | Total replica count for job running when Ascend Operator enables "gang" scheduling and the scheduler is Volcano. |
| queue | Default value is "default". Fill in according to the actual situation. | Queue to which the job belongs when Ascend Operator enables "gang" scheduling and the scheduler is Volcano. |
| (Optional) successPolicy |
| Prerequisite for job success. An empty value means that only one Pod needs to succeed for the entire job to be judged as successful. The value "AllWorkers" indicates that all Pods must succeed for the job to be judged as successful. |
| container.name | ascend | Name of the training container; must be "ascend". |
| (Optional) ports | If not specified, the system fills in the following parameters by default:
| Distributed training collective communication port. "containerPort" can be set according to actual conditions. If not set, the default port 2222 is used. |
| replicas |
| N is the number of job replicas. |
| image | - | Training image name. Modify it according to the actual situation. |
| sp-block | Chip quantity of the logical SuperPoD.
| Specifies the sp-block field. The cluster scheduling components will divide the physical SuperPoD into logical SuperPoDs based on the partitioning policy for affinity scheduling of the job. If not specified, Volcano scheduling will specify the logical SuperPoD size as the total number of NPUs configured for the job.
|
| tor-affinity |
Note: Users need to select the task type based on the number of task replicas. A task with fewer than 4 replicas is a filler task. A task with 4 or more replicas is a large model task. Normal tasks have no restriction on the number of task replicas. | The default value is null, indicating that switch affinity scheduling is not used. Users need to configure it based on the task type.
|
| pod-rescheduling |
| Pod-level rescheduling means that after a fault occurs, not all Pods are deleted. Instead, the faulty Pod is deleted, and a new Pod is created for rescheduling.
|
| subHealthyStrategy |
| Processing strategy for nodes whose status is SubHealthy. |
| huawei.com/Ascend910 | Atlas 800 training server (NPUs fully configured):
| Requested number of NPUs. Modify it according to the actual situation. |
| (.kind=="AscendJob").spec.replicaSpecs.{Master|Scheduler|Worker}.template.spec.containers[0].env[name==ASCEND_VISIBLE_DEVICES].valueFrom.fieldRef.fieldPath | The value is metadata.annotations['huawei.com/AscendXXX'], where XXX indicates the chip model. Supported values are 910, 310, and 310P. The value needs to be consistent with the actual chip type in the environment. | Ascend Docker Runtime obtains this parameter value to mount the corresponding type of NPU to the container. Note: This parameter only supports the full-NPU scheduling feature using the Volcano scheduler. Users using static vNPU scheduling and other schedulers need to delete the relevant fields of this parameter in the sample YAML. |
| fault-scheduling |
| - |
| fault-retry-times |
| - |
| backoffLimit |
| - |
| restartPolicy |
| Container restart policy. When configuring unconditional retry for service plane faults, the container restart policy value must be "Never". |
| terminationGracePeriodSeconds | 0 < terminationGracePeriodSeconds < grace-over-time parameter value | The time from when the container receives SIGTERM to being forcibly stopped by K8s. This time needs to be greater than 0 and less than the value of the grace-over-time parameter in the volcano-v{version}.yaml file. It also needs to ensure that the checkpoint file can be saved. Modify it according to the actual situation. For specific instructions, refer to the K8s Container Lifecycle Hooks. This field only takes effect when fault-scheduling is configured as grace; it is invalid when fault-scheduling is configured as force. |
| hostNetwork |
|
[!NOTE] Note When the HostNetwork value is true, if the current job YAML mounts the RankTable file path, the Pod's hostIP can be obtained by parsing the RankTable file in the training script to establish connections. If the job YAML does not mount the RankTable file path, it remains consistent with the original, using serviceIP to establish connections. |
| huawei.com/schedule.filter.faultCode | Value example: "8C1F8608:30, 80E01801", indicating that within a 30-second time window, fault 8C1F8608 is silenced; within a 60-second time window, fault 80E01801 is silenced. If the time window is not configured, the default is 60. The value range is 0 to 86400, in seconds. | Configures the fault codes and time windows that the job needs to silence.
|
| huawei.com/schedule.filter.faultLevel | Value example: "RestartRequest:30, RestartBusiness", indicating that within a 30-second time window, all faults at the RestartRequest level are silenced; within a 60-second time window, all faults at the RestartBusiness level are silenced. If the time window is not configured, the default is 60. The value range is 0 to 86400, in seconds. | Configures the fault levels and time windows that the job needs to silence.
|
Delivering, Viewing, and Deleting an Inference Job
After completing the preparation of the job YAML,perform the following operations:
- Deliver an inference job.
- View scheduling results.
- View the inference job running status.
- (Optional) Delete a job.
For detailed instructions on the above steps, see the "Cluster Service Deployment > Prefill-Decode Disaggregation Deployment > Installation and Deployment > Deploying a Single-Server Prefill-Decode Disaggregation Service Using kubectl" section in the MindIE Motor Development Guide.
global-ranktable Description
ClusterD listens to the information of the MS Controller and MS Coordinator job pods and the changes of the ConfigMap corresponding to each hccl.json file, and generates global-ranktable in real time. Some fields in global-ranktable are consistent with those in the hccl.json file. For details about hccl.json, see hccl.json File Description.
global-ranktable example of the
Atlas A2 training series products { "version": "1.0", "status": "completed", "server_group_list": [ { "group_id": "2", "deploy_server": "0", "server_count": "1", "server_list": [ { "device": [ { "device_id": "x", "device_ip": "xx.xx.xx.xx", "device_logical_id": "x", "rank_id": "x" } ], "server_id": "xx.xx.xx.xx", "server_ip": "xx.xx.xx.xx" } ] } ] }global-ranktable example of the
Atlas A3 training series products { "version": "1.2", "status": "completed", "server_group_list": [ { "group_id": "2", "deploy_server": "1", "server_count": "1", "server_list": [ { "device": [ { "device_id": "0", "device_ip": "xx.xx.xx.xx", "super_device_id": "xxxxx", "device_logical_id": "0", "rank_id": "0" } ], "server_id": "xx.xx.xx.xx", "server_ip": "xx.xx.xx.xx" } ], "super_pod_list": [ { "super_pod_id": "0", "server_list": [ { "server_id": "xx.xx.xx.xx" } ] } ] } ] }
Table 1 global-ranktable field description
| Field | Description |
|---|---|
| version | Version |
| status | Status |
| server_group_list | Server group list |
| group_id | Task group ID |
| server_count | Number of servers |
| server_list | Server list |
| server_id | AI Server identifier, globally unique |
| server_ip | Pod IP |
| device_id | NPU device ID |
| device_ip | NPU device IP |
| super_device_id | Unique identifier of the NPU within the |
| rank_id | Training rank ID corresponding to the NPU |
| device_logical_id | Logical ID of the NPU |
| super_pod_list | SuperPoD list |
| super_pod_id | Logical SuperPoD ID |
