AMCT (Caffe)

This section uses Ubuntu 20.04 as an example to describe the pre-installation actions. The version mapping is as follows:

Table 1 Version mapping

Type

Version Requirement

How to Obtain

Remarks

OS and version

EulerOS release 2.0 (SP10) aarch64

cat /etc/*release && uname -m

Only quantization on CPU is supported.

OS and version

Ubuntu 20.04 x86_64

Download the required software release from the Ubuntu official website and install it. Run the following command to query the installation:

cat /etc/*release && uname -m

Quantization on CPU or GPU is supported.

OS and version

Ubuntu 20.04 aarch64

Download the required software release from the Ubuntu official website and install it. Run the following command to query the installation:

cat /etc/*release && uname -m

Quantization on CPU or GPU is supported.

Caffe environment

Caffe-master branch

Currently, only the version with commit ID 9b891540183ddc834a02b2bd81b31afae71b2153 is supported.

Prepare the Caffe environment by following the Caffe tutorial.

You are advised to install the Caffe environment in source code mode. If the installation is performed in CLI mode and information similar to "/usr/bin/python3.7: can't open file '/usr/lib/python3.7/py_compile.py': [Error 2] No such file or directory" is displayed, rectify the fault by referring to What Do I Do If I Failed to Install the Caffe Environment in CLI Mode?.

-

CUDA toolkit/CUDA driver

11.3 or 10.0

Obtain required packages for installation. For example, you can obtain the Toolkit package from the following URL, which contains the Driver package.

https://developer.nvidia.com/cuda-toolkit-archive

You need to install the CUDA software to perform quantization on GPU.

NOTE:

If Ubuntu 20.04 is used, CUDA 11.3 is recommended. The default GCC version of Ubuntu 20.04 is GCC 9. If CUDA 10.0 is used, you must downgrade the default GCC version to the matched GCC 7. For details, see What Do I Do If a Compilation Error Is Reported Indicating that the CUDA and GCC Versions Do Not Match When Ubuntu 20.04 Is Used to Install the Caffe Environment?.

Python

Python3.7.x, Python3.8.x, Python3.9.x

Python 3.9.2 is recommended.

For Ubuntu, see Python 3.9.2 Installation on Ubuntu.

For EulerOS, see Python Python3.9.2 Installation on EulerOS.

  • Ensure that the server has Internet access.
  • This document uses Python 3.9.2 as an example. The environment variables and installation commands are subject to the actual Python version.

numpy

1.20.0+

For details, see Dependency Installation.

protobuf

3.13.0+