Certain aspects of AI Engine behavior can be configured at runtime.
These include the sautaration behavior of the accumulators and the rounding behavior when converting accumulators to vectors.
◆ rounding_mode
Rounding modes.
| Enumerator |
|---|
| floor | Always round towards negative infinity.
|
| ceil | Always round towards positive infinity.
|
| positive_inf | Round to nearest integer, with preference to positive infinity at half-way.
|
| negative_inf | Round to nearest integer, with preference to negative infinity at half-way.
|
| symmetric_inf | Round to nearest integer, with preference away from zero at half-way.
|
| symmetric_zero | Round to nearest integer, with preference towards zero at half-way.
|
| conv_even | Round to nearest integer, with preference to even numbers.
|
| conv_odd | Round to nearest integer, with preference to odd numbers.
|
◆ saturation_mode
Saturation modes.
| Enumerator |
|---|
| none | Allows values to overflow.
|
| truncate | Deprecated: use saturate instead.
|
| saturate | Retain maximum/minimum value on positive/negative overflow. Limits depend on type bit-width and if it has sign.
|
| symmetric | Retain maximum/minimum value on positive/negative overflow (signed types only). Max and min limits have exactly the same absolute value.
|
◆ current()
| static tile aie::tile::current |
( |
| ) |
|
|
inlinestatic |
Return an instance of tile representing the current tile.
◆ cycles()
| uint64_t aie::tile::cycles |
( |
| ) |
const |
|
inline |
Return the elapsed number of cycles.
◆ get_rounding()
Get the current rounding mode used in accumulator to vector conversions.
◆ get_saturation()
Get the current saturation mode.
◆ global_id()
| tile_id aie::tile::global_id |
( |
| ) |
const |
|
inline |
Return the global tile id.
◆ id()
◆ set_rounding()
Set the rounding mode used in accumulator to vector conversions.
- Parameters
-
◆ set_saturation()
Set the saturation mode.
- Parameters
-
| m | Saturation mode to be set |
◆ swap_rounding()
Set the rounding mode used in accumulator to vector conversions and return the previously set mode.
- Parameters
-
◆ swap_saturation()
Set the saturation mode and return the previously set mode.
- Parameters
-
| m | Saturation mode to be set |