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

Function TEST_F

dnn/test/arm_common/local.cpp:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using Param = param::Convolution;
12
13TEST_F(ARM_COMMON, LOCAL_FORWARD) {
14 auto args = local::get_args();
15 Checker<LocalForward> checker(handle());
16 for (auto&& arg : args) {
17 checker.set_param(arg.param).execs({arg.sshape(), arg.fshape(), arg.dshape()});
18 }
19
20 NormalRNG rng(10.f);
21 checker.set_rng(0, &rng).set_rng(1, &rng);
22 args = local::get_args_for_fp16();
23
24#if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
25 for (auto&& arg : args) {
26 checker.set_dtype(0, dtype::Float16())
27 .set_dtype(1, dtype::Float16())
28 .set_dtype(2, dtype::Float16());
29 checker.set_epsilon(1e-2);
30 checker.set_param(arg.param).execs({arg.sshape(), arg.fshape(), arg.dshape()});
31 }
32#endif
33}
34
35TEST_F(ARM_COMMON, LOCAL_FORWARD_RECORD) {
36 auto args = local::get_args();

Callers

nothing calls this directly

Calls 9

set_dtypeMethod · 0.80
get_argsFunction · 0.50
get_args_for_fp16Function · 0.50
runFunction · 0.50
execsMethod · 0.45
sshapeMethod · 0.45
fshapeMethod · 0.45
dshapeMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected