Environment Setup
Software Deployment
AOE running depends on the Ascend AI Processor. With the current tuning entry, developers can use other independent machines as the development environment and the hardware where the Ascend AI Processor resides as the operating environment. The NCS tool is used to remotely connect to the development environment and operating environment, and the AOE tool in the development environment is used to remotely debug the Ascend AI Processor.
Install Driver, Firmware, and Ascend-CANN-Toolkit, and set up the development environment and operating environment. For details, see CANN Software Installation Guide.
Dependency Installation
After the environments are set up, install dependent third-party software by referring to Table 1.
|
Third-party Software |
Description |
How to Install |
|---|---|---|
|
pciutils |
pciutils is installed in the environment for AOE tuning to obtain the hardware devices of the Ascend AI Processor using the lspci command. |
For example:
For other operating systems, run the command as required. |
Tool Preparation
The NCS tool is stored in ${install_path}/latest/tools/ncs. ${install_path} is the installation directory of the CANN package.
NCS Startup
- Before the startup, refer to Configuring the Key Certificate to configure a key certificate.
- Specify the NCS port and ensure its stability.
Before starting NCS, plan a port number for NCS. The default port number is 8000. The value range is [6000, 10000]. Then, run the following command to ensure the port stability.
Use iptables or nftables to limit the input traffic on the server. For example, set the maximum connection rate of port 8000 to 10,000 packets per second.
iptables -A INPUT -p tcp --sport 8000 -m limit --limit 10000/s -j ACCEPT iptables -A INPUT -p tcp --sport 8000 -j DROP
- Start NCS in the operating environment.
ncs &
To specify the IP address and port number of NCS, specify the ip and port parameters in the ncs --ip XX.XX.XX.XX --port port number & command. Change XX.XX.XX.XX and the port number as required. Ensure that the configured port number is available.
- Check whether NCS is started successfully.
ps -ef|grep ncs|grep -v "grep"
NCS is started successfully if you see the following information. The NCS daemon process has the ID of 257435, and the NCS running process has the ID of 257440.
1 2
root 257435 246668 0 07:54 pts/3 00:00:00 ncs root 257440 257435 0 07:54 pts/3 00:00:01 ncs --ip XX.XX.XX.XX --port XXXX --daemon false