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

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 the 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 the 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 visiting https://github.com/BVLC/caffe/tree/master.

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 the 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 Build Error Is Reported Indicating that the CUDA and GCC Versions Do Not Match When Ubuntu 20.04 Is Used to Install the Caffe Environment?

Unnecessary for EulerOS (AArch64).

Python

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

Python 3.9.2 is recommended.

For Ubuntu OS, see Python 3.9.2 Installation on Ubuntu.

For EulerOS, see Python3.9.2 Installation on EulerOS.

  • Ensure that the server has Internet access when installing dependencies.
  • 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 or later

For details, see Installing Dependencies.

Protobuf

3.20.2+