MindStudio Ops Generator Installation Guide¶
1. Installation Overview¶
This tool is integrated into CANN. If CANN is already installed and you do not need to update this tool, you can use it directly without following this document.
If CANN is not installed in your environment, see CANN Quick Installation to install the Ascend NPU driver and CANN software (including the Toolkit and ops package), and configure the environment variables.
To upgrade the tool separately or use the latest version, you can choose one of the following installation methods: Online Installation, Offline Installation, or Source Installation.
2. Installation Methods¶
2.1 Online Installation¶
If your device has internet access, you can use a single command to automatically download and install the tool. Visit the MindStudio download page on the Ascend Community website, select the corresponding CANN version, choose "Online Installation", and follow the prompts to complete the operation.
2.2 Offline Installation¶
For devices in enterprise intranets or other environments without internet access, first download the complete offline installation package on a machine with internet access, then transfer it to the target device for installation. Visit the MindStudio download page on the Ascend Community website, select the corresponding CANN version, choose "Offline Installation", and obtain the corresponding installation package and operation instructions.
2.3 Source Installation¶
If you need to use the latest code features or modify the source code to enhance functionality, download the repository code, compile and package the tool yourself, and complete the installation.
2.3.1 Environment Preparation¶
Follow the guide Operator Tool Development Environment Setup Guide to configure the environment.
-
Clone the repository
-
Install Python dependencies
2.3.2 Installation¶
2.3.2.1 Build the Package¶
Run the following command to generate .whl packages in the output directory, including both mindstudio_opgen and mindstudio_opst.
2.3.2.2 Install the .whl Packages¶
3. Uninstallation¶
To uninstall, follow these steps:
- Download the script.
[!NOTE]
- An internet connection is required to download the script. If the environment does not have internet access or is offline, download the script on a machine with internet access and copy it to the target device.
- If the command is unresponsive or a connection failure, SSL certificate error, or other problem occurs, see the FAQ.
- Run the uninstall command.
Replace {tools_name} with the name of the tool you want to uninstall. You can query the tool name by running python ms_install.py help. Available tools are listed under the "Available Tools" field in the output.
Upon successful uninstallation, the following message is displayed:
4. Upgrade¶
Upgrade means "uninstall first, then install". Run the installation command directly. The tool will automatically uninstall the old version and guide you through the upgrade installation.
5. Running UT and ST Test Cases¶
3.7 <= Python version <= 3.11. Replace ${INSTALL_DIR} with the file storage path after the CANN software is installed. For example, if the Ascend-CANN-Toolkit software package is installed, the default installation path is $HOME/Ascend/cann.
The test report is stored in the output directory.