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

Function prepare_src_dst

dnn/src/cuda/group_local/forward/opr_impl.cpp:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24TensorLayout prepare_src_dst(const TensorLayout& input, size_t g) {
25 TensorLayout ret = input;
26 megdnn_assert(ret[1] % g == 0);
27 ret[1] = ret[1] / g;
28 ret.init_contiguous_stride();
29 //! change stride of batch
30 ret.stride[0] = input.stride[0];
31 return ret;
32}
33
34TensorLayout prepare_filter(const TensorLayout& filter) {
35 //! group, OH, OW, ICg, FH, FW, OCg -> OH, OW, IcCg, FH, FW, OCg

Callers 2

execMethod · 0.85

Calls 1

Tested by

no test coverage detected