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

Method deduce_reformat_layout

dnn/src/cuda/pooling/algo.cpp:337–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337inline void PoolingForwardImpl::AlgoNCHW64::deduce_reformat_layout(
338 std::unique_ptr<RelayoutFormat>& relayout, const TensorLayout& src_layout,
339 TensorLayout& dst_layout, RelayoutFormat::Param::Mode mode, const int oc = 0,
340 const int group = 1) const {
341 if (src_layout.ndim > 0) {
342 RelayoutFormat::Param trans_param;
343 trans_param.mode = mode;
344 trans_param.oc = oc;
345 trans_param.group = group;
346 relayout->param() = trans_param;
347 relayout->deduce_layout(src_layout, dst_layout);
348 } else {
349 dst_layout = src_layout;
350 }
351}
352
353void PoolingForwardImpl::AlgoNCHW64::get_inner_layout(
354 const TensorLayout& src, const TensorLayout& dst, TensorLayout& inner_src,

Callers

nothing calls this directly

Calls 2

paramMethod · 0.45
deduce_layoutMethod · 0.45

Tested by

no test coverage detected