MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / TEST_F

Function TEST_F

dnn/test/rocm/chanwise_convolution.cpp:204–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202constexpr auto M = Convolution::Mode::CROSS_CORRELATION;
203
204TEST_F(ROCM, CHANWISE_CONVOLUTION_FORWARD) {
205 Checker<Convolution> checker(handle_rocm());
206 bool require_algo = false;
207 checker.set_before_exec_callback(
208 AlgoChecker<ConvolutionForward>("CHANNEL_WISE", &require_algo));
209
210 // simple case
211 checker.set_param(gconv_param({M, 0, 0, 1, 1}))
212 .execs({{1, 1, 2, 2}, {1, 1, 1, 2, 2}, {}})
213 .execs({{1, 1, 5, 5}, {1, 1, 1, 2, 2}, {}});
214
215 checker.execs({{2, 2, 5, 5}, {2, 3, 1, 2, 2}, {2, 6, 4, 4}});
216
217 checker.set_param(gconv_param({M, 1, 1, 1, 1}))
218 .execs({{2, 2, 5, 5}, {2, 1, 1, 2, 2}, {}});
219
220 checker.set_param(gconv_param({M, 2, 3, 2, 1}))
221 .execs({{32, 12, 20, 10}, {12, 2, 1, 4, 5}, {}});
222
223 // padding larger than kern
224 checker.set_param(gconv_param({M, 20, 30, 4, 5}))
225 .execs({{32, 12, 20, 10}, {12, 2, 1, 4, 5}, {}});
226}
227
228TEST_F(ROCM, CHANWISE_CONVOLUTION_BACKWARD_DATA) {
229 Checker<ConvolutionBackwardData> checker(handle_rocm());

Callers

nothing calls this directly

Calls 13

gconv_paramFunction · 0.70
check_need_full_benchFunction · 0.70
runFunction · 0.50
execsMethod · 0.45
allocMethod · 0.45
fill_srcMethod · 0.45
fill_fltMethod · 0.45
execMethod · 0.45
getMethod · 0.45
cmp_dstMethod · 0.45
fill_dstMethod · 0.45
cmp_srcMethod · 0.45

Tested by

no test coverage detected