Kunpeng Devkit development framework plug-in tool practice (using the development framework to create general-purpose computing applications)

Take you through the development framework to create general-purpose computing applications

After studying this course, I have a certain understanding of the development framework plug-in, and at the same time, I am familiar with the functions of the general computing application project of the plug-in, mastered the creation steps of the Kunpeng project, and improved my actual development efficiency.

Target:

background introduction 

Many developers will encounter such problems when they first come into contact with Kunpeng native development: they are not familiar with the API of the Kunpeng acceleration library, how to use it, and how to optimize their programs for acceleration of the Kunpeng processor. In response to these common problems encountered by new users when developing Kunpeng, Huawei launched the Kunpeng Development Framework Plugin, which helps developers develop Kunpeng applications more conveniently and enables developers to innovate efficiently. 

Features supported by the tool 

When intelligently associating   Coding, automatically associate related functions after optimizing the Kunpeng acceleration library 

Function search  supports code definition jump and function search of Kunpeng accelerated library functions 

When syntax highlighting   Coding, highlight related functions after optimization of the Kunpeng accelerated library 

Acceleration analysis   supports project and file scanning to identify functions that can be replaced by Kunpeng acceleration libraries 

Dictionary management   supports accelerated library function dictionary management, which can be updated online (automatically) and offline 

The automated construction project  can realize the automated construction project only by simple input and selection on the new Kunpeng project page 

Accelerated library deployment   supports Kunpeng platform to deploy accelerated libraries, which can improve application performance

Actual project 

KAEzip in action 

brief introduction 

KAEzip is the compression module of the Kunpeng acceleration engine. It uses the Kunpeng hard acceleration module to implement the deflate algorithm. Combined with the lossless user mode driver framework, it provides a high-performance Gzip/zlib format compression interface. 

Language: C++ 

Use the "KAEzip" project to help users become familiar with the creation process of the development framework plug-in general computing application project. The git address of this project is:  https://github.com/kunpengcompute/devkitdemo/tree/main/Development_framework/gpc-sdk/examples/kaezip 

prerequisite 

1. VSCode has been installed, and there is a Linux server with a correct compilation environment or apply for a server through a remote laboratory. 

2. The Kunpeng code migration tool has been installed. 

Steps 

Step 1 Install the Kunpeng DevKit entry plugin 

Search for any keyword such as Kunpeng, kun, kunpeng, etc. in the vscode plug-in market, find Kunpeng DevKit, and click to install. 

Step 2 Install the Kunpeng Development Framework Plugin 

Find the Kunpeng Development Framework Plugin in the Kunpeng DevKit extension package, and click Install. 

Step 3 Install the Kunpeng compilation and debugging plug-in 

Find Kunpeng Compiler Plugin in the Kunpeng DevKit extension package, click to install.

Step 4 Click "Select "Configure Remote Server" option, configure the code migration plug-in server and log in

Step 5 Click the "New Kunpeng Project" button to open the page for creating a new Kunpeng application project

Step 6 Select the "General Computing Application" tab to enter the page for creating a new general computing application

Step 7 Select the "Hardware Acceleration Application" page to enter the new hardware acceleration project page

Step 8 Enter the project name and project location, click "Next" to continue creating the project

Step 9 After the project creation and environment deployment are successful, click "Configure Target Server" to configure the target node server

Step 10 Click "View Application" and select "This Window" to view the application

Step 11 Open the compile and debug plug-in, select "compile and debug"

Step 12 After the synchronization and compilation are successful, click "Login to the target server" to connect to the target server

Step 13 Execute the command "cd $(workspace)/$(projectName)/src/kaezip/build&&ll" to view the compilation result

Summarize 

In this general computing application practice, through the joint compilation and debugging plug-in, the creation, compilation and operation process of the hardware acceleration application KAEzip is completely simulated. In the creation and secondary development of other different projects, we can refer to the ideas and operation process of this practice to improve development efficiency.

Guess you like

Origin blog.csdn.net/qq_63802547/article/details/128112921