Setup runtime environment

After the installation, the following dependencies should be installed before running PyAsc operators:

Ascend CANN

  1. Download installation package from the download center (recommended version is 9.1.0-beta.3) depending on the host platform:

    wget https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%209.1.T6/Ascend-cann-toolkit_9.1.0-beta.3_linux-$(arch).run
    
  2. Install downloaded package with the following command:

    bash Ascend-cann-toolkit_9.1.0-beta.3_linux-$(arch).run --full
    
  3. Enable CANN environment:

    source /usr/local/Ascend/cann/set_env.sh  # or ~/Ascend/cann/set_env.sh in case of user installation
    export LD_LIBRARY_PATH=$ASCEND_HOME_PATH/tools/simulator/Ascend950PR_9599/lib:$LD_LIBRARY_PATH
    

To learn more about CANN environment, visit the homepage. Ascend C API reference is available in the documentation.

PyTorch

It is recommended to install torch (CPU-only) to run tutorials and develop PyAsc operators. The package can be installed via pip:

python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu

Visit the official website to learn more.