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

Method get_workspace_in_bytes

dnn/src/common/matrix_inverse.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12size_t MatrixInverse::get_workspace_in_bytes(
13 const TensorLayout& src, const TensorLayout& dst) {
14 size_t batch, n;
15 canonize_params(src, &batch, &n);
16 megdnn_assert(
17 src.eq_layout(dst), "src and dst unequal: %s vs %s",
18 src.to_string().c_str(), dst.to_string().c_str());
19 return get_workspace_in_bytes(batch, n, src.dtype.size());
20}
21
22void MatrixInverse::canonize_params(
23 const TensorLayout& layout, size_t* batch, size_t* n) {

Callers

nothing calls this directly

Calls 4

eq_layoutMethod · 0.80
get_workspace_in_bytesFunction · 0.70
to_stringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected