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

Function check_layout_and_canonize

dnn/src/naive/relayout_format/opr_impl.cpp:318–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void check_layout_and_canonize(TensorLayout& src, TensorLayout& dst) {
319 megdnn_assert(dst.is_non_overlapping_strong());
320 src = src.collapse_contiguous();
321 dst = dst.collapse_contiguous();
322 megdnn_assert(dst.dtype.valid() && src.total_nr_elems() == dst.total_nr_elems());
323}
324
325} // anonymous namespace
326

Callers 5

execMethod · 0.85
execMethod · 0.85
execMethod · 0.85
execMethod · 0.85
execMethod · 0.85

Calls 4

collapse_contiguousMethod · 0.80
validMethod · 0.45
total_nr_elemsMethod · 0.45

Tested by

no test coverage detected