Introduction
Currently, SIMT APIs support only SIMD and SIMT programming. The SIMT programming will be supported in later versions.
SIMT APIs are parallel computing programming interfaces oriented to AI processors. They implement efficient parallel data computing based on the SIMT programming model. For details about API classification, see Table 1. In the SIMT programming, every 32 threads are divided into a group, which is called a warp. Warp-level APIs are used to process data of 32 threads in a single warp. Each thread in a warp is called a lane, and the number of each thread in a warp is the lane ID which ranges from 0 to 31.
Category |
Function |
|---|---|
Used to start a SIMT Vector Function (VF) subtask to launch a specified number of threads for executing the specified SIMT kernel function in SIMD and SIMT programming. |
|
Memory management and synchronization APIs, which are used to resolve data races and thread synchronization issues between threads in different cores. |
|
A set of functions used to process mathematical operations. |
|
A series of APIs for converting between different precision types. |
|
Used to determine whether the data is finite, infinite, or NaN. |
|
A series of APIs that perform atomic operations on the data or specific data in the Unified Buffer or Global Memory. |
|
A series of APIs for processing data of 32 threads in a single warp. |
|
Used to convert precisions based on the data types of the source and destination operands. |
|
Vector type construction APIs. |
|
Data loading and caching APIs. |
|
APIs used in the SIMT VF debugging scenario. |
Ascend C SIMT APIs can call APIs whose input data types are not half, half2, bfloat16_t, bfloat16x2_t, hifloat8x2_t, float8_e4m3x2_t or float8_e5m2x2_t by including the simt_api/asc_simt.h file. The simt_api/asc_fp16.h file is required for calling SIMT APIs whose input data is of the half or half2 type, the simt_api/asc_bf16.h file is required for calling SIMT APIs whose input data is of the bfloat16_t or bfloat16x2_t type, and the simt_api/asc_fp8.h file is required for calling SIMT APIs whose input data is of the hifloat8x2_t, float8_e4m3x2_t, or float8_e5m2x2_t type.
1 2 3 4 | #include "simt_api/asc_simt.h" #include "simt_api/asc_fp16.h" #include "simt_api/asc_bf16.h" #include "simt_api/asc_fp8.h" |
Category |
Any Other Type Excluding half, half2, bfloat16, and bfloat16x2_t |
half and half2 |
bfloat16_t and bfloatx2_t |
hifloat8x2_t, float8_e4m3x2_t and float8_e5m2x2_t |
|---|---|---|---|---|
#include "simt_api/common_functions.h" |
#include "simt_api/asc_fp16.h" |
#include "simt_api/asc_bf16.h" |
#include "simt_api/asc_fp8.h" |
|
#include "simt_api/device_sync_functions.h" |
||||
#include "simt_api/math_functions.h" |
||||
#include "simt_api/device_atomic_functions.h" |
||||
#include "simt_api/device_warp_functions.h" |
||||
#include "simt_api/device_functions.h" |
||||
#include "simt_api/vector_functions.h" |