requant_tile
-
void ckernel::requant_tile_init(const uint32_t zero_point, const uint32_t out_zero_point = 0)
-
Initialize the sfpu with the zero point argument of the re-quantization Op. To be called once at beginning of a kernel.
Both zero points are passed as fp32 bit patterns. zero_point is precomputed by the caller as -z_in * (s_in / s_out), where z_in is the input zero point.
Return value: None
Argument Description
zero_point -z_in * (s_in / s_out), as an fp32 bit pattern
out_zero_point The output zero point, as an fp32 bit pattern
-
void ckernel::requant_tile(uint32_t idst0, uint32_t idst1, uint32_t odst)
-
Performs an elementwise per-tensor affine re-quantization operation on the first operand using the scaling factor in the second operand. Output overwrites odst in DST.
Return value: None
Argument Description
idst0 The index of the tile in DST register buffer to use as first operand
idst1 The index of the tile in DST register buffer to use as second operand
odst The index of the tile in DST register buffer to use as output