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

Method alloc_output

dnn/test/common/utils.cpp:114–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114TensorND DynOutMallocPolicyImpl::alloc_output(
115 size_t /*id*/, DType dtype, const TensorShape& shape, void* /*user_data*/) {
116 auto ptr = megdnn_malloc(m_handle, dtype.size() * shape.total_nr_elems());
117 return {ptr, TensorLayout{shape, dtype}};
118}
119
120void* DynOutMallocPolicyImpl::alloc_workspace(size_t sz, void* /*user_data*/) {
121 return megdnn_malloc(m_handle, sz);

Callers 5

execMethod · 0.45
execMethod · 0.45
execMethod · 0.45
execMethod · 0.45
execMethod · 0.45

Calls 2

sizeMethod · 0.45
total_nr_elemsMethod · 0.45

Tested by

no test coverage detected