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

Function get_inner_layout

dnn/src/cuda/warp_perspective/forward.cpp:31–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void get_inner_layout(
32 const TensorLayout& src, const TensorLayout& dst, TensorLayout& inner_src,
33 TensorLayout& inner_dst, Handle* handle,
34 WarpPerspectiveForwardImpl::Param::Format format) {
35 if ((src.dtype.enumv() == DTypeEnum::QuantizedS4 ||
36 src.dtype.enumv() == DTypeEnum::Quantized4Asymm) &&
37 dst.dtype.enumv() == src.dtype.enumv() &&
38 format == param::WarpPerspective::Format::NCHW) {
39 auto relayout_opr = handle->create_operator<RelayoutFormat>();
40 deduce_reformat_layout(
41 relayout_opr, src, inner_src, RelayoutFormat::Param::Mode::NCHW_NCHW64,
42 0, 1);
43 deduce_reformat_layout(
44 relayout_opr, dst, inner_dst, RelayoutFormat::Param::Mode::NCHW_NCHW64,
45 0, 1);
46 } else {
47 megdnn_assert(0, "not support");
48 }
49}
50
51} // namespace
52

Callers 4

get_workspace_bundleMethod · 0.85
execMethod · 0.85
get_workspace_bundleMethod · 0.85
execMethod · 0.85

Calls 2

deduce_reformat_layoutFunction · 0.70
enumvMethod · 0.45

Tested by

no test coverage detected