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

Method get_workspace_in_bytes

dnn/src/fallback/warp_perspective/opr_impl.cpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41namespace fallback {
42
43size_t WarpPerspectiveImpl::get_workspace_in_bytes(
44 const TensorLayout&, const TensorLayout&, const TensorLayout&,
45 const TensorLayout& dst) {
46 if (param().format == param::WarpPerspective::Format::NCHW) {
47 size_t OH = dst.shape[2], OW = dst.shape[3];
48 return get_bundle(OH, OW).total_size_in_bytes();
49 } else {
50 return 0;
51 }
52}
53
54size_t WarpPerspectiveImpl::get_workspace_in_bytes(
55 const TensorLayoutArray&, const TensorLayout&, const TensorLayout&,

Callers

nothing calls this directly

Calls 3

total_size_in_bytesMethod · 0.80
get_bundleFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected