Installing SRA_Inference
This section describes how to install SRA_Inference using the RPM package and verify the package. If you use parameters that are supported by the RPM package management tool but not described in this document, undefined behaviors may be introduced. Exercise caution when performing this operation.
Procedure
- Obtain the SRA_Inference software package by performing Obtaining the Software Package and decompress it to obtain the binary RPM package.
unzip BoostKit-SRA_Inference-1.1.0.zip
- Install the RPM package.
1rpm -ivh boostkit-sra_inference-xxxx.aarch64.rpm
After the installation is complete, the environment variable LD_LIBRARY_PATH is automatically added to /etc/profile.
- For Kunpeng 920:
- The KTFOP NEON dynamic library files are in /usr/local/sra_inference/lib/neon.
- The KONNX dynamic library files are in /usr/local/sra_inference/lib/neon.
- For new Kunpeng 920 processor model:
- The KTFOP NEON dynamic library files are in /usr/local/sra_inference/lib/neon.
- The KTFOP SVE dynamic library files are in /usr/local/sra_inference/lib/sve.
- The KONNX dynamic library files are in /usr/local/sra_inference/lib/neon.
In the preceding command, xxxx indicates the version number.
- For Kunpeng 920:
Verification
- Run the source command or log in to the terminal again for the environment variable to take effect.
1source /etc/profile
- Check whether the environment variable LD_LIBRARY_PATH contains the KTFOP and KONNX installation path /usr/local/sra_inference/lib.
1env | grep LD_LIBRARY_PATH
If the variable contains the installation path, the installation is successful.
After the installation, the target files are generated in the installation path (the default path is /usr/local/sra_inference), where the include folder contains the KTFOP and KONNX header files, and the lib folder contains the KTFOP and KONNX dynamic library files.
- Add the paths of the dynamic library and the header file to the GCC compilation option to link the required dynamic library file. Then run the ldd command to check whether the dependency library of the program is correctly linked.
- KTFOP
- Link the KTFOP library.
- NEON version:
1-I /usr/local/sra_inference/include -L /usr/local/sra_inference/lib/neon -lktfop
- SVE version:
1-I /usr/local/sra_inference/include -L /usr/local/sra_inference/lib/sve -lktfop
- NEON version:
- Link the KML_BLAS library.
- Link the KTFOP library.
- KONNX
1-I /usr/local/sra_inference/include/ -L /usr/local/sra_inference/lib/neon -lkonnx
- KTFOP