MindStudio Ops Generator Installation Guide
Installation Description
MindStudio Ops Generator (msOpGen) is a tool for improving operator development efficiency. It provides the template project generation capability, simplifies operator project setup, and facilitates operator testing and validation. MindStudio Ops System Test (msOpST) is a tool for improving operator development efficiency. It tests the input and output of an operator in a real-world hardware environment to check operator functions. This document describes how to install msOpGen and msOpST.
Preparing for Installation
1. Environment and Dependencies
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.
Installing Python Dependencies
pip install -r requirements.txt
2. Generating .whl Packages
The generated .whl packages (mindstudio_opgen and mindstudio_opst) are stored in the output directory.
python build.py
Installation Procedure
Installing the .whl Packages
cd output
pip install mindstudio_opgen-xxxxx.whl
pip install mindstudio_opst-xxxxx.whl
Uninstallation
Run the following commands to uninstall the packages:
pip uninstall mindstudio_opgen-xxxxx.whl
pip uninstall mindstudio_opst-xxxxx.whl
Upgrade
To replace the installed .whl package with another .whl package, run the following command:
pip install mindstudio_opgen-xxxxx.whl --force-reinstall
pip install mindstudio_opst-xxxxx.whl --force-reinstall
During the installation, if the system asks you whether to replace the original installation package,
enter y. The installation package will be automatically upgraded.
Running UT and ST Cases
3.7 <= Python version <= 3.10. Replace \${INSTALL_DIR} with the actual CANN installation directory. For example, if the Ascend-CANN-Toolkit software package is installed, the default installation directory is $HOME/Ascend/cann.
source ${INSTALL_DIR}/set_env.sh
The test report is stored in the output directory.
python build.py test