25template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
30 output_window<TT>* out
32 static void registerKernelClass() {
33 REGISTER_FUNCTION(MaxpoolScalarBHWC::filter);
42template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
47 output_window<TT>* out
49 static void registerKernelClass() {
50 REGISTER_FUNCTION(MaxpoolScalarBCHW::filter);
60template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
64 input_window<float>* in_window,
65 output_window<float>* out_window
67 static void registerKernelClass() {
68 static_assert(INP_W % 8 == 0);
69 static_assert(OUT_W % 4 == 0);
70 static_assert(KH == 2);
71 static_assert(KW == 2);
72 static_assert((std::is_same<TT, float>::value));
73 REGISTER_FUNCTION(Maxpool2x2FloatBCHW::filter);
83template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
85 static constexpr int RUN_16CHUNK = INP_W % 32 != 0;
88 input_window<TT>* in_window,
89 output_window<TT>* out_window
91 static void registerKernelClass() {
92 static_assert(INP_W % 16 == 0);
93 static_assert(OUT_W % 8 == 0);
94 static_assert(KH == 2);
95 static_assert(KW == 2);
96 static_assert((std::is_same<TT, int8_t>::value) || (std::is_same<TT, uint8_t>::value));
107template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
109 static constexpr int RUN_16CHUNK = INP_W % 32 != 0;
112 input_window<TT>* in_window,
113 output_window<TT>* out_window
115 static void registerKernelClass() {
116 static_assert(INP_W % 32 == 0);
117 static_assert(OUT_W % 16 == 0);
118 static_assert(KH == 3);
119 static_assert(KW == 3);
120 static_assert(STEP_W == 2);
121 static_assert(STEP_H == 2);
122 static_assert((std::is_same<TT, TT>::value) || (std::is_same<TT, uint8_t>::value));
123 REGISTER_FUNCTION(Maxpool3x3Int8BCHW::filter);
132template <
typename TT,
int INP_H,
int INP_W,
int OUT_H,
int OUT_W,
int B,
int C,
int KH,
int KW,
int STEP_H,
int STEP_W>
136 input_window<TT>* in,
137 output_window<TT>* out
139 static void registerKernelClass() {
140 REGISTER_FUNCTION(AvgpoolScalarBCHW::filter);
Scalar implementation for BCHW avgpool, AvgpoolScalarBCHW::filter<24,32,16,1,6> total = 15766.
Definition pool.h:133
Vector implementation for float BCHW maxpool with 2x2 kernel, requires INP_W%8==0,...
Definition pool.h:61
Vector implementation for int8 BCHW maxpool with 2x2 kernel, requires INP_W%16==0,...
Definition pool.h:84
void filter(input_window< TT > *in_window, output_window< TT > *out_window)
Definition pool.cc:149
Vector implementation for int8 BCHW maxpool with 2x2 kernel, requires INP_W%16==0,...
Definition pool.h:108
Scalar implementation for BCHW maxpool, MaxpoolScalarBCHW::filter<24,32,16,1,6> total = 11302.
Definition pool.h:43
Scalar implementation for BHWC maxpool, MaxpoolScalarBHWC::filter<24,32,16,1,6> total = 7673.
Definition pool.h:26