MCPcopy Create free account
hub / github.com/MegEngine/MegCC / TEST

Function TEST

compiler/test/kernel/opr/naive/resize.cpp:7–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace megcc::KernelGen;
6
7TEST(NAIVE, Resize) {
8 Checker<ResizeForward> checker;
9 checker.set_kernel_symbol("kernel_.*");
10 using Param = megdnn::ResizeForward::Param;
11 megcc::test::UniformRNG rng(-30, 30);
12 checker.set_rng(0, &rng);
13 checker.set_epsilon(5e-4);
14 Param param;
15 param.format = Param::Format::NCHW;
16 param.imode = Param::InterpolationMode::LINEAR;
17 checker.set_param(param);
18 checker.execs({{1, 1, 5, 6}, {1, 1, 7, 13}});
19 checker.execs({{1, 4, 5, 6}, {1, 4, 9, 12}});
20 checker.execs({{2, 3, 15, 16}, {2, 3, 9, 12}});
21 param.format = Param::Format::NCHW44;
22 param.imode = Param::InterpolationMode::LINEAR;
23 checker.set_param(param);
24 checker.execs({{1, 1, 5, 6, 4}, {1, 1, 7, 13, 4}});
25 checker.execs({{1, 4, 5, 6, 4}, {1, 4, 9, 12, 4}});
26 checker.execs({{2, 3, 15, 16, 4}, {2, 3, 9, 12, 4}});
27 param.format = Param::Format::NCHW;
28 param.imode = Param::InterpolationMode::NEAREST;
29 checker.set_param(param);
30 checker.execs({{1, 1, 5, 6}, {1, 1, 7, 13}});
31 checker.execs({{1, 4, 5, 6}, {1, 4, 9, 12}});
32 checker.execs({{2, 3, 15, 16}, {2, 3, 9, 12}});
33}

Callers

nothing calls this directly

Calls 1

execsMethod · 0.45

Tested by

no test coverage detected