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

Function set_nchw_args

dnn/test/fallback/resize.cpp:161–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160namespace {
161static void set_nchw_args(resize::IMode imode, std::vector<resize::TestArg>& args) {
162 param::Resize param;
163 param.format = param::Resize::Format::NCHW;
164 param.imode = imode;
165 rep(n, 4ul) rep(c, 4ul) rep(ih, 4ul) rep(iw, 4ul) rep(oh, 4ul) rep(ow, 4ul)
166 args.emplace_back(
167 param, TensorShape{n + 1ul, c + 1ul, ih + 1ul, iw + 1ul},
168 TensorShape{n + 1ul, c + 1ul, oh + 1ul, ow + 1ul});
169 args.emplace_back(param, TensorShape{1, 1, 10, 10}, TensorShape{1, 1, 20, 20});
170 args.emplace_back(param, TensorShape{1, 1, 10, 10}, TensorShape{1, 1, 7, 9});
171 args.emplace_back(param, TensorShape{2, 2, 3, 4}, TensorShape{2, 2, 6, 8});
172 args.emplace_back(param, TensorShape{1, 2, 6, 8}, TensorShape{1, 2, 3, 4});
173}
174} // namespace
175
176TEST_F(FALLBACK, RESIZE_NCHW_FP32) {

Callers 1

TEST_FFunction · 0.70

Calls 2

emplace_backMethod · 0.80
repFunction · 0.50

Tested by

no test coverage detected