Installing the Framework Plugin Package
Software Package Preparation
Before installing the software, refer to Table 1 to obtain required software packages and corresponding digital signature files. The versions of the software packages must be consistent.
Once you download this software, you agree to the terms and conditions of Huawei Enterprise End User License Agreement (EULA).
Name |
Software |
Description |
How to Obtain |
|---|---|---|---|
Framework plugin package |
Ascend-cann-tfplugin_{version}_linux-{arch}.run |
Plugin package, an adaptation plugin used to connect to the upper-layer framework TensorFlow. If the deep learning framework TensorFlow is used for online inference or training, you need to obtain the software package. |
{version} indicates the software version, and {arch} indicates the CPU architecture.
Digital Signature Verification
To avoid using software packages that have been tampered with during transfer or storage, download their integrity verification files while downloading the software packages.
Click PGP Verify to obtain the tool package, decompress it and verify the PGP digital signature. For details, see OpenPGP Signature Verification Guide. If the verification fails, do not use the software package. Click here to contact technical support.
Procedure
- Log in to the installation environment as the installation user of each software package. Upload the obtained framework plugin package to any path (for example, /home/package) in the installation environment.
- Go to the directory where the software package is stored and run the following command to grant the execute permission on the software package:
chmod +x Ascend-cann-tfplugin_{version}_linux-{arch}.run - Check the consistency and integrity of the software package installation file.
./Ascend-cann-tfplugin_{version}_linux-{arch}.run --check - Install the software. (The following commands support parameters such as --install-path=<path>. For details about the parameters, see Command-Line Options.)
./Ascend-cann-tfplugin_{version}_linux-{arch}.run --install - You need to sign the Huawei Enterprise End User License Agreement (EULA) before starting the installation process. You can enter y or Y to confirm the agreement based on the command output, or enter any other character to reject the agreement. After you accept the agreement, the installation starts.If the current language environment does not meet the requirements, run the following commands to configure the default language environment:
# Set the language to Chinese (simplified). export LANG=zh_CN.UTF-8 # Set the language to English. export LANG=en_US.UTF-8
If the following information is displayed, the software is successfully installed:1xxx install success
xxx indicates the name of the actual software package to be installed.
- Set environment variables. You can modify the ~/.bashrc file to set permanent environment variables. The procedure is as follows:
- Run the vi ~/.bashrc command in any directory as the running user to open the .bashrc file, and add the following content to the end of the file. The default installation path of the root user is used as an example. Change it to the actual installation path of set_env.sh.
source /usr/local/Ascend/tfplugin/set_env.sh
- Run the :wq! command to save the file and exit.
- Run the source ~/.bashrc command for the modification to take effect immediately.
- Run the vi ~/.bashrc command in any directory as the running user to open the .bashrc file, and add the following content to the end of the file. The default installation path of the root user is used as an example. Change it to the actual installation path of set_env.sh.
- Check whether the installation is successful. Query the CANN version. If the query result is the same as the version of the installation software package, the installation is successful.
- Go to the directory where the software package installation information file is stored.
cd /usr/local/Ascend/tfplugin/latest
In the preceding command, /usr/local/Ascend is the default installation path of the root user. Replace it with the actual installation path.
- Run the following command to query the version:
cat ascend_tfplugin_install.info
- Go to the directory where the software package installation information file is stored.
Follow-up Operations
When the training script stores data in a serialized structure (for example, calling the serialization-related APIs of TensorFlow), if Protobuf is installed using pip, the protobuf/pyext/_message.cpython-37m-<arch>-linux-gnu.so dynamic library will be missing. Compiling the dynamic library during training will cause low performance. Re-install Protobuf using the source code before the training service is executed. This will compile the protobuf/pyext/_message.cpython-37m-<arch>-linux-gnu.so dynamic library, thereby improving the training performance.
For details, see Installing Protobuf of the Python Version.
Command-Line Options
One-click software installation is supported in the command line. You can select commands as required to complete the installation. All options below are optional.
Installation command format: ./software_package_name.run [options]
For details, see Table 2.
If the option queried by running the ./software_package_name.run --help command is not in the following table, the option is reserved or applies to other processor models. You do not need to pay attention to it.
The following options are not displayed in --help. Do not use them directly.
- --xwin: uses the xwin operating mode.
- --phase2: performs the second step.