跳转至

MindStudio Kernel Performance Prediction Installation Guide

This document describes how to install the msKPP tool: using the CANN package and building from source.

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.


Installation from Source Code

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.

Environment Setup

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

Python 3.9 or later must be installed in the build environment.

msKPP depends on other Python libraries. You can run the pip install -r requirement.txt command to install the dependency libraries in one-click mode. The dependency list is as follows:

plotly>=5.11.0

Building and Packaging

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

python build.py

Installation and Uninstallation

Preparing the .run Package

The .whl 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_kpp-XXX.whl

Installation

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

pip install mindstudio_kpp-xxxxx.whl

Post-installation Configuration

The current CANN package has integrated msKPP. After activating the CANN environment, you can use msKPP in your Python script.

source ~/Ascend/cann/set_env.sh
python
>>> import mskpp
>>> ...

Uninstallation

You can run the following command to uninstall the tool:

pip uninstall mskpp-xxxxx.whl 

Upgrade

To replace the installed .whl package with another .whl package, run the following command:

pip install mindstudio_kpp-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.