exp_tile

template<bool approx = false, bool fast_and_approx = true, uint32_t scale = 0x3F800000>
void ckernel::exp_tile_init()

Please refer to documentation for any_init.

Template scale parameter is used when aprox and fast_and_approx are true and exp_tile is called with scale_en set to true.

template<bool approx = false, bool fast_and_approx = true, bool scale_en = false, bool skip_positive_check = false, int iterations = 8>
void ckernel::exp_tile(uint32_t idst, int vector_mode = (int)VectorMode::RC, uint16_t scale = 0x3F80)

Performs element-wise computation of exponential on each element of a tile in the DST register. The DST register buffer must be in an acquired state via an acquire_dst call. This call is blocking and is only available on the compute engine.

Return value: None

Template Parameter

Description

Type

Valid Range

Default

approx

Enable approximate mode.

bool

true, false

false

fast_and_approx

If approx is true, enable fast approximation.

bool

true, false

true

scale_en

Enable input scaling by a constant factor in approximate or non-approximate mode

bool

true, false

false

skip_positive_check

Skip large-positive input check

bool

true, false

false

iterations

Number of iterations over 32-SFPU lanes to run

int

Positive integer

8

Argument

Description

Type

Valid Range

Required

idst

The index of the tile in DST register buffer to perform the computation on

uint32_t

Must be less than the size of the DST register buffer

True

vector_mode

Specifies the vector mode for computation (default: VectorMode::RC)

int

Subject to specific hardware/kernel limits

False

scale

Scale factor to apply in approximate or non-approximate mode if scale_en is true (default: 0x3F80, 1.0f in FP16b)

uint16_t

Valid FP16b representation

False