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

Function TEST

compiler/test/kernel/opr/arm/reduce.cpp:6–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace megcc::KernelGen;
5using Mode = ReduceForward::Param::Mode;
6TEST(AARCH64, Reduce) {
7 Checker<Reduce> checker(Arch::ARM64);
8 for (auto mode :
9 {Mode::SUM, Mode::MEAN, Mode::MAX, Mode::MIN, Mode::PRODUCT, Mode::SUM_SQR})
10 for (auto src : {TensorShape{2, 3}, {3, 4, 5}, {4, 5, 6, 7}})
11 for (size_t axis = 0; axis < 4; ++axis) {
12 if (axis < src.ndim) {
13 ReduceForward::Param param;
14 param.axis = axis;
15 param.mode = mode;
16 checker.set_param(param);
17 checker.execs({src, {}});
18 }
19 }
20}

Callers

nothing calls this directly

Calls 1

execsMethod · 0.45

Tested by

no test coverage detected