Environment Setup
Environment Requirements
Before developing an operator, you need to install the driver, firmware, CANN Toolkit, and ops OPP. For details about the installation procedure, see For details, see CANN Software Installation Guide..
- ${git_clone_path} is the installation path of the sample repository.
- Check whether the host uses the --debug option to install the HDK driver package by referring to Step 1.
- To enable msDebug, install the NPU driver and firmware using either of the following methods (method 1 is recommended for CANN 8.1.RC1 and later, and driver 25.0.RC1 and later):
- Method 1: Specify the --full parameter during driver installation, and then run the echo 1 > /proc/debug_switch command as the root user to enable the debugging channel. Then the msDebug tool can be used.
./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --full
- Method 2: Specify the --debug parameter during driver installation. For details, see "NPU Driver and Firmware Installation".
./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --debug
- Method 1: Specify the --full parameter during driver installation, and then run the echo 1 > /proc/debug_switch command as the root user to enable the debugging channel. Then the msDebug tool can be used.
Restrictions
- For security and least privilege purposes, you are advised to use a common user account instead of a high-permission user account (such as root) to run the tools in this code repository.
- Before using the operator development tools, ensure that the execution user's umask is 0027 or more restrictive. Otherwise, the generated performance data directories and files will have excessive permissions.
- Before using the tools, ensure that the least privilege principle is used. For example, the other user is not allowed to write data, which is often implemented by disabling 666 and 777.
- You are not advised to configure or run custom scripts in directories of the other user to avoid privilege escalation.
- When downloading the code sample, run the following command to specify the branch version:
git clone https://gitee.com/ascend/samples.git -b master