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

Method get_workspace_in_bytes

dnn/src/naive/group_norm/opr_impl.cpp:146–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144namespace naive {
145
146size_t GroupNormBackwardImpl::get_workspace_in_bytes(
147 const TensorLayout&, const TensorLayout& data, const TensorLayout&,
148 const TensorLayout&, const TensorLayout& rstd, const TensorLayout&,
149 const TensorLayout&, const TensorLayout&) {
150 size_t N = data.shape[0];
151 size_t C = data.shape[1];
152 size_t G = rstd.shape[1];
153 return get_workspace_bundle(N, C, G, data.dtype.size()).total_size_in_bytes();
154}
155
156WorkspaceBundle GroupNormBackwardImpl::get_workspace_bundle(
157 size_t N, size_t C, size_t G, size_t dtype_size, void* raw_ptr) {

Callers

nothing calls this directly

Calls 3

total_size_in_bytesMethod · 0.80
get_workspace_bundleFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected