Installing the Tool
This section describes the commands for installing AMCT.
AMCT (PyTorch)
- In the directory where the AMCT package is located, run the following command to install from the source code (if the installation user is root, delete --user from the installation command):
pip3 install amct_pytorch-{version}-py3-none-linux_{arch}.tar.gz --userReplace {version} with the actual AMCT version number, and {arch} with the actual architecture of the installation server. If AMCT installation is performed by the root user and the --target option is included, ensure that the path specified by --target is the path of the current user.
- If the following message is displayed, the installation is successful:
1 2 3
Successfully build amct-pytorch ... Successfully installed amct-pytorch-{version}
Find the installed AMCT in the path where the Python package is located (for example, $HOME/.local/lib/python3.9/site-packages).
1 2
drwxr-xr-x 5 amct amct 4096 Mar 17 11:50 amct_pytorch/ drwxr-xr-x 2 amct amct 4096 Mar 17 11:50 amct_pytorch-{version}.dist-info/
amct_pytorch indicates the AMCT installation directory.
amct_pytorch and amct_tensorflow cannot be imported in the same Python process. The two packages share the same basic_info.proto file. If they are imported at the same time, the .proto file is repeatedly defined.
amct_tensorflow is the installation directory of AMCT under the TensorFlow framework. The basic_info.proto file is stored in /proto under the AMCT installation directory.
AMCT (ONNX)
- Install AMCT.In the directory where the AMCT package is located, run the following command (if the installation user is root, delete --user from the installation command):
pip3 install amct_onnx-{version}-py3-none-linux_{arch}.whl --userReplace {version} with the actual AMCT version number, and {arch} with the actual architecture of the installation server. If AMCT installation is performed by the root user and the --target option is included, ensure that the path specified by --target is the path of the current user.
- If the following message is displayed, the installation is successful:
1Successfully installed amct-onnx-{version}
Find the installed AMCT in the path where the Python package is located (for example, $HOME/.local/lib/python3.9/site-packages).
1 2
drwxr-xr-x 5 amct amct 4096 Mar 17 11:50 amct_onnx/ drwxr-xr-x 2 amct amct 4096 Mar 17 11:50 amct_onnx-{version}.dist-info/
amct_onnx indicates the AMCT installation directory.
AMCT (TensorFlow)
- In the directory where the AMCT package is located, run the following command (if the installation user is root, delete --user from the installation command):
The package in this format is installed using the source code. During the installation, the build and installation operations are performed.
pip3 install amct_tensorflow-{version}-py3-none-linux_{arch}.tar.gz --userReplace {version} with the actual AMCT version number, and {arch} with the actual architecture of the installation server. If AMCT installation is performed by the root user and the --target option is included, ensure that the path specified by --target is the path of the current user.
If you fail to install AMCT using the source package due to lack of certain build dependencies on the installation server, build the source package into a .whl package for installation by referring to AMCT Installation with .whl Package Built from Source Package.
- If the following message is displayed, the installation is successful:
1Successfully installed amct-tensorflow-{version}
Find the installed AMCT in the path where the Python package is located (for example, $HOME/.local/lib/python3.9/site-packages).
1 2
drwxr-xr-x 5 amct amct 4096 Mar 17 11:50 amct_tensorflow/ drwxr-xr-x 2 amct amct 4096 Mar 17 11:50 amct_tensorflow-{version}.dist-info/
amct_tensorflow indicates the AMCT installation directory.
amct_tensorflow and amct_pytorch cannot be imported in the same Python process. The two packages share the same basic_info.proto file. If they are imported at the same time, the .proto file is repeatedly defined.
amct_pytorch is the installation directory of AMCT under the PyTorch framework. The basic_info.proto file is stored in /proto under the AMCT installation directory.
AMCT (Caffe)
- In the directory where the AMCT package is located, run the following command (if the installation user is root, delete --user from the installation command):
pip3 install amct_caffe-{version}-py3-none-linux_{arch}.whl --userReplace {version} with the actual AMCT version number, and {arch} with the actual architecture of the installation server. If AMCT installation is performed by the root user and the --target option is included, ensure that the path specified by --target is the path of the current user.
- If the following message is displayed, the installation is successful:
1Successfully installed amct-caffe-{version}
Find the installed AMCT in the path where the Python 3.9.2 package is located (for example, $HOME/.local/lib/python3.9/site-packages).
1 2
drwxr-xr-x 5 amct amct 4096 Mar 17 11:50 amct_caffe/ drwxr-xr-x 2 amct amct 4096 Mar 17 11:50 amct_caffe-{version}.dist-info/
amct_caffe indicates the AMCT installation directory.
AMCT (TensorFlow, Ascend)
- In the directory where the AMCT package is located, run the following command (if the installation user is root, delete --user from the installation command):
The package in this format is installed using the source code. During the installation, the build and installation operations are performed.
pip3 install amct_tensorflow_ascend-{version}-py3-none-linux_{arch}.tar.gz --userReplace {version} with the actual AMCT version number, and {arch} with the actual architecture of the installation server. If AMCT installation is performed by the root user and the --target option is included, ensure that the path specified by --target is the path of the current user.
If you fail to install AMCT using the source package due to lack of certain build dependencies on the installation server, build the source package into a .whl package for installation by referring to AMCT Installation with .whl Package Built from Source Package.
- If the following message is displayed, the installation is successful:
1Successfully installed amct-tensorflow-ascend-{version}
Find the installed AMCT in the path where the Python package is located (for example, $HOME/.local/lib/python3.9/site-packages).
1 2
drwxr-xr-x 5 amct amct 4096 Mar 17 11:50 amct_tensorflow/ drwxr-xr-x 2 amct amct 4096 Mar 17 11:50 amct_tensorflow_ascend-{version}.dist-info/
amct_tensorflow indicates the AMCT installation directory.