relu_tile

void ckernel::relu_tile_init()
void ckernel::relu_tile(uint32_t idst)

Performs element-wise computation of relu(x) = (0 if x is negative else x) on each element of a tile in DST register at index tile_index. The DST register buffer must be in acquired state via tile_regs_acquire call. This call is blocking and is only available on the compute engine.

Return value: None

Argument Description

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

void ckernel::relu_tile_int32(uint32_t idst)

relu_max_tile

void ckernel::relu_max_tile_init()
void ckernel::relu_max_tile(uint32_t idst, uint32_t param0)

Performs element-wise computation of relu max (relu(max(x, upper_limit))) on each element of a tile in DST register at index tile_index. The DST register buffer must be in acquired state via tile_regs_acquire call. This call is blocking and is only available on the compute engine.

Return value: None

Argument Description

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

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

upper_limit Upper limit of relu_min

void ckernel::relu_max_tile_int32(uint32_t idst, uint32_t param0)

relu_min_tile

void ckernel::relu_min_tile_init()
void ckernel::relu_min_tile(uint32_t idst, uint32_t param0)

Performs element-wise computation of relu min (relu(min(x, lower_limit))) on each element of a tile in DST register at index tile_index. The DST register buffer must be in acquired state via tile_regs_acquire call. This call is blocking and is only available on the compute engine.

Return value: None

Argument Description

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

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

lower_limit Upper limit of relu_min

void ckernel::relu_min_tile_int32(uint32_t idst, uint32_t param0)

leaky_relu_tile

void ckernel::leaky_relu_tile_init()
void ckernel::leaky_relu_tile(uint32_t idst, uint32_t slope = 0)

Performs element-wise computation of leaky relu (relu(x) + slope*-relu(-x)) on each element of a tile in DST register at index tile_index. The DST register buffer must be in acquired state via tile_regs_acquire call. This call is blocking and is only available on the compute engine.

Return value: None

Argument Description

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

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

slope slope used in leaky relu - will reinterpret unsigned int to float