Installing the Driver and Firmware
Prerequisites
The preparations for the installation are complete. For details, see Preparations for Installation.
Procedure
Install the software driver package and then the .run firmware package. The procedures for installing the software packages are the same. Replace the asterisks (*) in the software packages based on the actual situation.
- Log in to the operating environment as user root and upload the *.run packages to any directory, for example, /opt, in the operating environment.
- Grant the execute permission on the software packages to the installation user.
Run the ls -l command in the directory where the software package is stored to check whether the installation user has the permission to execute the file. If the installation user does not have the permission, run the following command:
chmod +x *.run
- Run the following command to check the consistency and integrity of the software package installation file:
./*.run --check
- Run the following command to perform installation:
- If the installation path of the software package has been specified, for example, /test/HiAI/, run the ./*.run --full --install-path=/test/HiAI/ command.
- If the software package is installed in the default installation directory, run the ./*.run --full command.
- The installation path is specified for the driver component. It is not supported to specify the installation path for firmware. The installation path of firmware is the same as that of the driver.
- If the driver is installed in a specified path:
- In the scenario where the specified path does not exist, a directory is automatically created during the installation. If there are multiple levels of directories, the directory is automatically created only when the last level of directory does not exist.
- If the specified path already exists:
- If the owner of all levels of directories in the path is the root user, ensure that the permission on all levels of directories is at least 755.
If this requirement is not met, run the chmod 755 path command to change the permission on the path.
- If the owner of a level-1 directory in the path is not the root user, change the owner to the root user and ensure that the permission on all levels of directories is 755.
If this requirement is not met, run the chown root:group_name_path command to change the path owner to root.
- If the owner of all levels of directories in the path is the root user, ensure that the permission on all levels of directories is at least 755.
- If the root user is specified as the running user, the --install-for-all parameter must be included in the installation command as follows. In this scenario, security risks may exist.
--install-username=root --install-usergroup=root --install-for-all
Default installation path: /usr/local/Ascend
Installation log path: /var/log/ascend_seclog/ascend_install.log
Driver/Firmware installation path, installation command, and user information: /etc/ascend_install.info
- For a general driver package, if the following command output is displayed, DKMS has not been installed and the default kernel source code path /lib/modules/`uname -r`/build does not exist. Enter the following information as prompted:
[WARNING]rebuild ko has something wrong, detail in /var/log/ascend_seclog/ascend_rebuild.log Do you want to try build driver after input kernel absolute path? [y/n]:
If you want to continue the installation, enter y.
When the following information is displayed, enter the actual path of the kernel source code, for example, /lib/modules/`uname -r`/build-bak:
Please input your kernel absolute path:
Press Enter to continue the installation.
- If DKMS and related components such as kernel-header and kernel-devel have been installed, the system automatically compiles and installs the DKMS driver.
- If DKMS has not been installed but the default kernel source code path (for example, /lib/modules/`uname -r`/build) already exists, the kernel is automatically used for driver compilation.
- If information similar to the following is displayed, the installation is successful:
- Driver:
Driver package install success! Reboot needed for installation/upgrade to take effect!
- Firmware:
Firmware package install success! Reboot needed for installation/upgrade to take effect!
- Driver:
- Restart the operating environment.
- Check the version of the installed driver.
In the software package installation path, for example, the default path of the root user /usr/local/Ascend/{package_name}, run the following command to check whether the target version is correct:
cat version.info
Version=1.73.T105.0.B050
- Check the version of the installed NPU firmware.
/usr/local/Ascend/driver/tools/upgrade-tool --device_index -1 --component -1 --version
Get component version(1.73.5.0.b050) succeed for deviceId(0), componentType(0). {"device_id":0, "component":nve, "version":1.73.5.0.b050} Get component version(1.73.5.0.b050) succeed for deviceId(0), componentType(3). {"device_id":0, "component":uefi, "version":1.73.5.0.b050} Get component version(1.73.5.0.b050) succeed for deviceId(0), componentType(8). {"device_id":0, "component":imu, "version":1.73.5.0.b050} Get component version(1.73.105.0.b050) succeed for deviceId(0), componentType(9). {"device_id":0, "component":imp, "version":1.73.105.0.b050}
- Run the npu-smi info command to check whether the NPU tool is successfully installed.
The installation is successful if the following information is displayed. Otherwise, the installation fails. Contact Huawei technical support.
- In the command output, the field after npu-smi is the NPU tool version, and the field after Version: is the NPU driver version.
- For details about how to use other commands, see the Atlas 300T Training Card npu-smi Command Reference (Model 9000).
Important Notes
- After the .run installation package is used, do not manually set the environment variable export LD_LIBRARY_PATH to the original SO file of the .rar package. Otherwise, the tool in the .run installation package may connect to the dynamic library of the earlier version. The third-party library file path and non-run installation package release library file path are not affected.
- Observe the following when viewing logs: The log time is the system time. The time on the device is the same as that on the host. You can run the date command to change the time on the host.
For example, to set the system time to 17:55:55, run the date -s 17:55:55 command.