1#ifndef QUANTIZE_LINEAR_H
2#define QUANTIZE_LINEAR_H
24template <
typename TT,
int INP_H,
int INP_W,
int OUT_W>
35 ): y_scale(y_scale), y_zero(y_zero) {};
38 input_window<float>* in,
39 output_window<TT>* out
42 static void registerKernelClass() {
43 static_assert(INP_W <= OUT_W);
44 REGISTER_FUNCTION(QuantizeLinearScalar::filter);
54template <
typename TT,
int INP_H,
int INP_W,
int OUT_W>
64 int16_t y_scale_inv_int;
73 input_window<float>* in,
74 output_window<TT>* out
77 static void registerKernelClass() {
78 static_assert(INP_W%4 == 0 && OUT_W%16 == 0);
79 static_assert(INP_W <= OUT_W);
80 REGISTER_FUNCTION(QuantizeLinear::filter);
90template <
typename TT,
int INP_H,
int INP_W,
int OUT_W>
101 ): y_scale(y_scale), y_zero(y_zero) {};
104 input_window<float>* in,
105 output_window<TT>* out
108 static void registerKernelClass() {
109 static_assert(INP_W%4 == 0 && OUT_W%16 == 0);
110 static_assert(INP_W <= OUT_W);
111 REGISTER_FUNCTION(QuantizeLinearFmul::filter);
121template <
typename TT,
int INP_H,
int INP_W,
int OUT_W>
132 ): y_scale(y_scale), y_zero(y_zero) {};
135 input_stream<float>* in,
136 output_stream<TT>* out
139 static void registerKernelClass() {
140 static_assert(INP_W%4 == 0 && OUT_W%16 == 0);
141 static_assert(INP_W <= OUT_W);
142 REGISTER_FUNCTION(QuantizeLinearFmulStream::filter);
Vector stream implementation, requires INP_W%4==0, OUT_W%16==0, INP_W <= OUT_W, QuantizeLinearFmulStr...
Definition quantize_linear.h:122
Vector implementation, requires INP_W%4==0, OUT_W%16==0, INP_W <= OUT_W, QuantizeLinearFmul<1*1*28*28...
Definition quantize_linear.h:91
Scalar implementation, requires INP_W <= OUT_W, QuantizeLinearScalar<1*1*28*28> takes 92121 cycles.
Definition quantize_linear.h:25
Vector implementation, requires INP_W%4==0, OUT_W%16==0, INP_W <= OUT_W, QuantizeLinear<1*1*28*28> ta...
Definition quantize_linear.h:55