![]() |
AI Engine-ML v2 Intrinsics User Guide
v2025.1
|
These annotations are used after heading of the for or while loop. More...
Macros | |
#define | __aie_loop_count(x) |
Set the number of iterations of a loop. | |
#define | __aie_loop_flatten() |
Unroll the loop completely (in case of a manifest loop count). | |
#define | __aie_loop_fold() |
Explicitly tell the compiler that the loop can be pipelined when the loop count is not manifest. | |
#define | __aie_loop_fold_no_warn() |
Disable the warning for missing opportunities to pipeline loops, or when the directive does not help. | |
#define | __aie_loop_fold_require(x) |
Set the required loop decrement for the loop to be pipelined. | |
#define | __aie_loop_fold_with_range(x, ...) |
Explicitly tell the compiler that the loop can be pipelined and provide the minimum and maximum number of iterations. | |
#define | __aie_loop_peel(x) |
Peel the first x iterations of a loop and insert them in the preamble. | |
#define | __aie_loop_range(x, ...) |
Set the minimum and maximum number of iterations of a loop. | |
#define | __aie_loop_unroll(...) |
Unroll the loop by a factor. | |
#define | __aie_loop_unroll_no_warn() |
Disable all the warnings related to loop unrolling. | |
#define | __aie_loop_unroll_preamble() |
Generates an additional preamble for the loop unrolling containing loop_count % N iterations. | |
These annotations are used after heading of the for or while loop.
#define __aie_loop_count | ( | x | ) |
Set the number of iterations of a loop.
x | loop count. |
#define __aie_loop_flatten | ( | ) |
Unroll the loop completely (in case of a manifest loop count).
The flattening is done at scheduling phase (please see __aie_loop_unroll()).
#define __aie_loop_fold | ( | ) |
Explicitly tell the compiler that the loop can be pipelined when the loop count is not manifest.
This is useful when the loop count is not manifest and the compiler cannot determine if the loop can be pipelined.
#define __aie_loop_fold_no_warn | ( | ) |
Disable the warning for missing opportunities to pipeline loops, or when the directive does not help.
#define __aie_loop_fold_require | ( | x | ) |
Set the required loop decrement for the loop to be pipelined.
x | loop decrement value. |
#define __aie_loop_fold_with_range | ( | x, | |
... ) |
Explicitly tell the compiler that the loop can be pipelined and provide the minimum and maximum number of iterations.
#define __aie_loop_peel | ( | x | ) |
Peel the first x iterations of a loop and insert them in the preamble.
x | number of iterations to peel. |
#define __aie_loop_range | ( | x, | |
... ) |
Set the minimum and maximum number of iterations of a loop.
The format can be either: (n,) or (n,m), being n the minimum number of iterations and m the maximum number of iterations.
#define __aie_loop_unroll | ( | ... | ) |
Unroll the loop by a factor.
If used the value N, the loop will be unrolled N-1 times, and the loop count is divided by N. When the loop count is not guaranteed to be a multiple of N, you have to complement the unroll with __aie_loop_unroll_preamble().
The unrolling is done at the front-end level, providing better software pipelining of loops.
To fully unroll the loop, use __aie_loop_unroll(*). This requires the loop count to be manifest.
... | loop unroll factor. |
#define __aie_loop_unroll_no_warn | ( | ) |
Disable all the warnings related to loop unrolling.
#define __aie_loop_unroll_preamble | ( | ) |
Generates an additional preamble for the loop unrolling containing loop_count % N iterations.