Ascend Operator
- Users who use full-NPU scheduling (training), static vNPU scheduling (training), resumable training, or elastic training must install Ascend Operator. If Volcano is used as the scheduler, it must be installed first; otherwise, Ascend Operator will fail to start.
- Users who use full-NPU scheduling (inference) and scheduling upon inference card faults to submit distributed inference job of the AscendJob type must install Ascend Operator.
- Users who only use containerization and resource monitoring, inference card fault recovery, or scheduling upon inference card faults (single-node jobs) do not need to install Ascend Operator. Please skip this chapter directly.
- Before starting Ascend Operator, Volcano must be started first. Ascend Operator needs to perceive PodGroup resources.
- The maximum number of replicas for a single AscendJob that Ascend Operator allows to create is 20,000.
Log in to the K8s management node as the
rootuser and run the following command to check whether the Ascend Operator image and version number are correct.docker images | grep ascend-operatorThe following is an example of the output:
ascend-operator v26.0.0 c532e9d0889c About an hour ago 137MB- If correct, proceed to Step 2.
- If not correct, see Preparing Images to complete image creation and distribution.
Copy the YAML files from the extracted Ascend Operator software package directory to any directory on the K8s management node.
If you do not modify the component startup parameters, you can skip this step. Otherwise, modify the Ascend Operator startup parameters in the YAML file based on the actual situation. For startup parameters, see Table 1. You can run
./ascend-operator -hto view parameter descriptions.(Optional) Use Ascend Operator to generate the collective communication configuration file (RankTable File, also known as the hccl.json) for training jobs under the PyTorch and MindSpore frameworks, to shorten the cluster communication link establishment time. Users of other frameworks can skip this step.
The parent directory of the hccl.json file is already mounted by default in the startup YAML. Modify it based on the actual situation.
... - name: ranktable-dir mountPath: /user/mindx-dl/ranktable # Container path, cannot be modified ... volumes: - name: ascend-operator-log hostPath: path: /var/log/mindx-dl/ascend-operator type: Directory - name: ranktable-dir hostPath: path: /user/mindx-dl/ranktable # Host path. The root directory of the hccl.json file save path in the job YAML must be consistent with the host path. type: DirectoryOrCreate # Used to check whether the given folder exists. If it does not exist, an empty folder will be created. ...- The root directory path of the RankTable inside the container cannot be modified, but the host path can be modified. When deploying a job, the root directory of the
hccl.jsonfile save path in the job YAML must be consistent with the host path. - The permissions of the RankTable root directory folder must meet one of the following conditions:
- The owning user and user group are
hwMindX(the default running user of cluster scheduling components). - The permissions of the RankTable root directory folder are
777.
- The owning user and user group are
- The root directory path of the RankTable inside the container cannot be modified, but the host path can be modified. When deploying a job, the root directory of the
Run the following command to create the specific mount path for the
hccl.jsonfile in the parent directory.mkdir -m 777 /user/mindx-dl/ranktable/{Mount path}
In the path where the YAML file is located on the management node, run the following command to start Ascend Operator.
kubectl apply -f ascend-operator-v{version}.yamlThe following is a startup example:
deployment.apps/ascend-operator-manager created serviceaccount/ascend-operator-manager created clusterrole.rbac.authorization.k8s.io/ascend-operator-manager-role created clusterrolebinding.rbac.authorization.k8s.io/ascend-operator-manager-rolebinding created customresourcedefinition.apiextensions.k8s.io/ascendjobs.mindxdl.gitee.com created ...Run the following command to check whether the component has started successfully.
kubectl get pod -n mindx-dlThe following is an example of the output. Running indicates that the component startup is successful.
NAME READY STATUS RESTARTS AGE ... ascend-operator-7667495b6b-hwmjw 1/1 Running 0 11s
- If the component Pod status is not
Runningafter installation, see Component Pod Status Not Running. - If the component Pod status is
ContainerCreatingafter installation, see Cluster Scheduling Component Pod in ContainerCreating State. - If the component fails to start, see Cluster Scheduling Component Startup Failure, Log Prints "get sem errno =13".
- If the component starts successfully but the corresponding Pod cannot be found, see Component Startup YAML Executed Successfully but Corresponding Pod Not Found.
Table 1 Ascend Operator startup parameters
Whether to query the Ascend Operator version.
|
|||
The log level supports the following values:
|
|||
Log backup time limit. The value range is 7 to 700, in days. |
|||
Log file. When a single log file exceeds 20 MB, the automatic dump function is triggered. The maximum file size cannot be modified. The naming format of the dumped file is: ascend-operator-.log, for example: ascend-operator-2023-10-07T03-38-24.402.log. |
|||
Maximum number of log files retained after dumping. The value range is 1 to 30, in units of file count. |
|||
Whether to enable "gang" policy scheduling. It is enabled by default. When enabled, task scheduling is performed based on the scheduler specified by the task. For details about "gang" policy scheduling, see the open-source Volcano official documentation. |
|||
Whether to compress and dump log files when the log file size reaches the dump threshold (this parameter will be deprecated later).
|
|||
Path to kubeconfig. Must be configured when the program runs outside the cluster. |
|||
Burst traffic used when communicating with K8s. The value range is (0, 10000]. If the value is outside this range, the default value 100 is used. |
|||
QPS (queries per second) used for communication with K8s. The value range is (0,10000]. If the value is outside this range, the default value of 50 is used. |
|||