Environment Setup
Software Package Installation
- Prepare the software packages according to the following table.
Table 1 Software package list Component
Introduction
Toolkit
Toolkit package for development, debugging, and tuning, which contains operator tools, model tools, and app tools.
Firmware
Firmware package, which basic firmware, such as UEFI, is usually burnt into during device production. Firmware can also be upgraded by installing this package in a later stage.
Driver
Driver package, used for interaction, scheduling, and transfer between the host and device. This package contains the device manager, query driver, graph execution task scheduling driver, training data transfer preprocessing driver, and AI CPU operator loading and execution driver.
PyTorch (optional)
When using the Python APIs of PyTorch for programming, you need to install PyTorch-related software.
- Install the software package. Install the driver, firmware, and Ascend-CANN-Toolkit by referring to CANN Software Installation.
- Set the environment variables.CANN provides a process-level script for you to automatically set environment variables. The following commands are examples, in which the default installation paths are under the root or non-root user. Replace them with actual installation paths.
# Configure environment variables after installing the Toolkit package as the root user. source /usr/local/Ascend/cann/set_env.sh # Configure environment variables after installing the Toolkit package as a non-root user. source ${HOME}/Ascend/cann/set_env.sh
Tool Acquisition
The tool is stored in the ${INSTALL_DIR}/compiler/bin/op_compiler directory.
Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.