High-Level APIs

High-level APIs are abstracted and encapsulated based on common algorithms of a single core to improve programming and development efficiency. Generally, multiple basic APIs are called. High-level APIs include math library, Matmul, and Softmax APIs.

As shown in the following figure, to implement a matrix multiplication operation, you need to pay attention to the logic such as format conversion and data tiling when using basic APIs. However, when you use high-level APIs, you do not need to pay attention to the logic. Instead, you can directly pass the input matrix and call APIs to obtain the output.

Note that the dependent header file needs to be imported when the Tiling API of the high-level APIs is called or the Tiling struct parameter of the high-level APIs is used in the program. The following is an example:

1
#include "tiling/tiling_api.h"