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

Method exec

dnn/src/cuda/convolution3d/forward/1x1x1.cpp:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 return args.handle->matmul_opr()->get_workspace_in_bytes(A, B, C);
42}
43void Convolution3DForwardImpl::Algo1x1x1::exec(const ExecArgs& args) const {
44 TensorND A, B, C;
45 extract_matmul_layouts(args, A.layout, B.layout, C.layout);
46 A.reset_ptr(args.filter_tensor->raw_ptr());
47 B.reset_ptr(args.src_tensor->raw_ptr());
48 C.reset_ptr(args.dst_tensor->raw_ptr());
49 size_t batch = args.src_layout->shape[0];
50 auto mm = args.handle->matmul_opr();
51 auto strd_B = args.src_layout->stride[0] * args.src_layout->dtype.size(),
52 strd_C = args.dst_layout->stride[0] * args.dst_layout->dtype.size();
53 for (size_t i = 0; i < batch; ++i) {
54 mm->exec(A, B, C, args.workspace);
55 incr_refp(B.get_ref_ptr(), strd_B);
56 incr_refp(C.get_ref_ptr(), strd_C);
57 }
58}
59// vim: syntax=cpp.doxygen

Callers

nothing calls this directly

Calls 6

incr_refpFunction · 0.85
reset_ptrMethod · 0.80
raw_ptrMethod · 0.45
matmul_oprMethod · 0.45
sizeMethod · 0.45
get_ref_ptrMethod · 0.45

Tested by

no test coverage detected