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

Function TEST_F

dnn/test/cuda/batch_conv_bias.cpp:315–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313} // namespace
314
315TEST_F(CUDA, BATCH_CONV_BIAS_QS8) {
316 require_compute_capability(6, 1);
317 Checker<BatchConvBiasForward> checker(handle_cuda());
318 checker.set_before_exec_callback(AlgoChecker<BatchConvBiasForward>(
319 "BATCH_CONV_BIAS_INT8_NCHW4_IMPLICIT_GEMM_PRECOMP_DOTPROD"));
320 UniformIntRNG const_rng{1, 1};
321 UniformIntRNG rng{-5, 5};
322 UniformIntRNG bias_rng{-50, 50};
323 checker.set_rng(0, &rng)
324 .set_rng(1, &rng)
325 .set_rng(2, &rng)
326 .set_rng(3, &rng)
327 .set_dtype(0, dtype::QuantizedS8{1.2f})
328 .set_dtype(1, dtype::QuantizedS8{1.3f})
329 .set_dtype(2, dtype::QuantizedS32{1.2f * 1.3f})
330 .set_dtype(3, dtype::QuantizedS8{1.1f})
331 .set_dtype(4, dtype::QuantizedS8{1.1f})
332 .set_epsilon(1 + 1e-3)
333 .set_max_avg_error(1e-1)
334 .set_max_avg_biased_error(1e-1);
335 param::BatchConvBias param;
336 param.pad_h = 2, param.pad_w = 1;
337 param.stride_h = 1, param.stride_w = 2;
338 param.format = param::BatchConvBias::Format::NCHW4;
339 checker.set_param(param).execs(
340 {{32, 4, 24, 24, 4}, {32, 32, 4, 1, 1, 4}, {1, 8, 1, 1, 4}, {}, {}});
341}
342
343TEST_F(CUDA, BATCH_CONV_BIAS_QS8_GEMM) {
344 require_compute_capability(6, 1);

Callers

nothing calls this directly

Calls 8

check_batch_conv_biasFunction · 0.85
get_int8_nchw4_args_gemmFunction · 0.85
get_facerec_bench_argsFunction · 0.85
set_dtypeMethod · 0.80
get_int8_nchw4_argsFunction · 0.70
benchmark_target_algoFunction · 0.70
execsMethod · 0.45

Tested by

no test coverage detected