跳转至

MindStudio Sanitizer Installation Guide


1. Binary Installation

The MindStudio toolchain is integrated into the CANN package for release. You can install it in either of the following ways.

Method 1: Install the software according to the CANN official document

For details, see CANN Installation Guide. Perform the installation and configuration step by step according to the document.

Method 2: Use the official CANN container image

Visit CANN official image repository. Pull the image and start the container according to the instructions in the repository.


2. Source Code Installation

To use the functions of the latest code or modify the source code to enhance functions, you can download the code from this repository, build and package the tool, and install it.

2.1 Environment Setup

Set up the environment by referring to the Operator Tool Development Environment Setup Guide.

2.2 Building and Packaging

Run the one-click script to automatically download and build the dependency repository:

python build.py

2.3 Installation and Uninstallation

2.3.1 Preparing the .run Package

The .run package is generated in the output directory. Run the following commands to ensure that the .run package has the execute permission:

cd output
chmod +x mindstudio-sanitizer_*.run

2.3.2 Installation

Copy the .run package to the operating environment (not required for local installation) and perform the following operation:

./mindstudio-sanitizer_*.run --run

If an earlier version of the tool has been installed in the system, a message will be displayed during the installation asking you whether to replace it. Enter "y" to perform an overwrite installation.

[!NOTE]NOTE
If the ASCEND_HOME_PATH environment variable has been configured in the environment, the tool will be installed in the $ASCEND_HOME_PATH directory. Otherwise, the tool will be installed in the $HOME/Ascend directory by default. To specify a custom installation path, use the --install-path option. For example: ./mindstudio-sanitizer_*.run --install-path=./xxx --run install the runfile to the xxx directory.

2.3.3 Uninstallation

You can run the following command to uninstall the tool:

./mindstudio-sanitizer_*.run --uninstall

[!NOTE]NOTE
By default, the tool is uninstalled from the $HOME/Ascend directory. If a custom path is specified using --install-path during the installation, explicitly add the --install-path option during uninstallation. For example: ./mindstudio-sanitizer_*.run --install-path=./xxx --uninstall.

2.3.4 Upgrade

The upgrade process essentially involves uninstalling the old version and installing the new version, which is the same as the overwrite installation method described in Section 2.3.2 Installation.

2.4 FAQs

2.4.1 Why Is the Newly Compiled Tool Not Being Invoked After Installation?

Run the following commands to check whether the related environment variables are correctly configured to ensure that the newly installed operator tool is preferentially used by the system:

export ASCEND_HOME_PATH=$HOME/Ascend  # For custom installation paths, run "export ASCEND_HOME_PATH=$PWD/xxx".
export PATH=$ASCEND_HOME_PATH/bin:$PATH
export LD_LIBRARY_PATH=$ASCEND_HOME_PATH/lib64:$LD_LIBRARY_PATH

2.4.2 How Do I Uninstall the Software When the .run Package Has Been Deleted?

You can run the following command to perform the uninstallation:

bash $HOME/Ascend/share/info/mindstudio-sanitizer/script/uninstall.sh

For a custom installation path, use the uninstallation script in the corresponding path:

bash ./xxx/share/info/mindstudio-sanitizer/script/uninstall.sh