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

Function run_pooling_check

dnn/test/fallback/pooling.cpp:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void run_pooling_check(
46 Handle* handle, std::vector<std::pair<param::Pooling, TensorShapeArray>> args,
47 bool is_int8) {
48 Checker<Pooling> checker(handle);
49 UniformIntRNG rng_int8{INT8_MIN >> 1, INT8_MAX >> 1};
50 UniformIntRNG rng_fp32{-10, 10};
51 if (is_int8) {
52 checker.set_dtype(0, dtype::QuantizedS8(1.1f));
53 checker.set_rng(0, &rng_int8);
54 } else {
55 checker.set_rng(0, &rng_fp32);
56 }
57 for (auto arg : args) {
58 checker.set_param(arg.first).exec(arg.second);
59 }
60}
61} // namespace
62
63TEST_F(FALLBACK_MULTI_THREADS, POOLING_GI_NCHW44_FP32) {

Callers 1

TEST_FFunction · 0.70

Calls 2

set_dtypeMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected