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

Function TEST_F

dnn/test/armv7/conv_bias.cpp:15–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace {
14
15TEST_F(ARMV7, CONV_BIAS_MATMUL_QU8) {
16 using namespace conv_bias;
17 std::vector<TestArg> args = get_quantized_args();
18 Checker<ConvBiasForward> checker(handle());
19 checker.set_before_exec_callback(
20 conv_bias::ConvBiasAlgoChecker<ConvBias>("QU8MATMUL"));
21
22 UniformIntRNG rng{0, 127};
23 for (auto&& arg : args) {
24 if (arg.bias.ndim == 4 && arg.bias[2] != 1 && arg.bias[3] != 1)
25 continue;
26 checker.set_dtype(0, dtype::Quantized8Asymm(2.5f, static_cast<uint8_t>(127)))
27 .set_dtype(1, dtype::Quantized8Asymm(2.7f, static_cast<uint8_t>(129)))
28 .set_dtype(2, dtype::QuantizedS32(6.75f))
29 .set_dtype(4, dtype::Quantized8Asymm(60.25f, static_cast<uint8_t>(125)))
30 .set_rng(0, &rng)
31 .set_rng(1, &rng)
32 .set_rng(2, &rng)
33 .set_param(arg.param)
34 .execs({arg.src, arg.filter, arg.bias, {}, {}});
35 }
36}
37
38TEST_F(ARMV7, CONV_BIAS_MATMUL_QS8) {
39 using namespace conv_bias;

Callers

nothing calls this directly

Calls 3

get_quantized_argsFunction · 0.85
set_dtypeMethod · 0.80
execsMethod · 0.45

Tested by

no test coverage detected