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

Function TEST_F

dnn/test/naive/conv_bias.cpp:26–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24} // namespace
25
26TEST_F(NAIVE, CONV_BIAS_QUANTIZED8x8x32) {
27 Checker<ConvBias> checker(handle(), /* check_dispatch */ false);
28 ConvBias::Param param;
29 param.format = ConvBias::Param::Format::NCHW;
30
31 checker.set_param(param).exect(
32 Testcase{
33 TensorValue(
34 {1, 1, 4, 4}, dtype::QuantizedS8(0.1f),
35 {90 - 128, 136 - 128, 85 - 128, 204 - 128, 48 - 128,
36 9 - 128, 226 - 128, 25 - 128, 118 - 128, 109 - 128,
37 87 - 128, 132 - 128, 104 - 128, 163 - 128, 25 - 128,
38 90 - 128}),
39 TensorValue(
40 {3, 1, 3, 3}, dtype::QuantizedS8(0.2f),
41 {153 - 124, 170 - 124, 102 - 124, 103 - 124, 23 - 124,
42 213 - 124, 116 - 124, 195 - 124, 191 - 124, 44 - 124,
43 50 - 124, 247 - 124, 172 - 124, 42 - 124, 32 - 124,
44 233 - 124, 163 - 124, 247 - 124, 120 - 124, 241 - 124,
45 209 - 124, 83 - 124, 201 - 124, 115 - 124, 32 - 124,
46 140 - 124, 147 - 124}),
47 TensorValue({1, 3, 1, 1}, dtype::QuantizedS32(0.02f), {0, 0, 0}),
48 TensorValue(
49 {1, 3, 2, 2}, dtype::QuantizedS32(0.3f),
50 {1234, 0, 0, 0, 0, 0, 0, 0, 0, -234, 0, 0}),
51 {}},
52 Testcase{
53 {},
54 {},
55 {},
56 {},
57 TensorValue(
58 {1, 3, 2, 2}, dtype::QuantizedS32(0.1f * 0.2f),
59 {37127, -22475, -15694, -1920,
60
61 -12813, 4440, 18190, -13195,
62
63 -9659, 12423, -5558, -4969})});
64}
65
66TEST_F(NAIVE, CONV_BIAS_QUANTIZED4x4x32) {
67 Checker<ConvBias> checker(handle(), false);

Callers

nothing calls this directly

Calls 15

TensorValueFunction · 0.85
TensorValueLowbit4Function · 0.85
exectMethod · 0.80
reset_ptrMethod · 0.80
dist_byteMethod · 0.80
spanMethod · 0.80
dist_elemMethod · 0.80
set_dtypeMethod · 0.80
raw_ptrMethod · 0.45
sizeMethod · 0.45
paramMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected