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

Function TEST_F

dnn/test/cuda/convolution.cpp:25–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24#if CUDNN_MAJOR > 9
25TEST_F(CUDA, CONVOLUTION_8X8X32) {
26 require_compute_capability(6, 1);
27
28 using namespace convolution;
29 std::vector<TestArg> args;
30 {
31 auto v = get_args();
32 for (auto&& a : v) {
33 args.push_back(std::move(a));
34 }
35 }
36 {
37 auto v = get_dilated_args();
38 for (auto&& a : v) {
39 args.push_back(std::move(a));
40 }
41 }
42 {
43 auto v = get_chanwise_args();
44 for (auto&& a : v) {
45 args.push_back(std::move(a));
46 }
47 }
48 Checker<ConvolutionForward> checker(handle_cuda());
49 UniformIntRNG rng(-4, 4);
50 for (auto arg : args) {
51 arg.param.format = param::Convolution::Format::NHWC;
52 arg.src = cvt_src_or_dst_nchw2nhwc(arg.src);
53 arg.filter = cvt_filter_nchw2nhwc(arg.filter);
54 checker.set_dtype(0, dtype::Int8())
55 .set_dtype(1, dtype::Int8())
56 .set_dtype(2, dtype::Int32())
57 .set_param(arg.param)
58 .set_rng(0, &rng)
59 .set_rng(1, &rng)
60 .execs({arg.src, arg.filter, {}});
61 }
62}
63#endif
64
65TEST_F(CUDA, CONVOLUTION_FORWARD) {

Callers

nothing calls this directly

Calls 15

get_chanwise_argsFunction · 0.85
cvt_src_or_dst_nchw2nhwcFunction · 0.85
cvt_filter_nchw2nhwcFunction · 0.85
TensorLayoutClass · 0.85
check_compute_capabilityFunction · 0.85
maxFunction · 0.85
set_dtypeMethod · 0.80
emplace_backMethod · 0.80
get_argsFunction · 0.50
sqrtFunction · 0.50
runFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected