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

Method BlobData

imperative/src/impl/blob_manager_impl.cpp:8–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace imperative {
7
8BlobManagerImpl::BlobData::BlobData(OwnedBlob* in_blob) {
9 blob = in_blob;
10 DeviceTensorStorage d_storage;
11 d_storage.reset(blob->m_comp_node, blob->m_size, blob->m_storage);
12 h_storage = HostTensorStorage(blob->m_comp_node);
13 h_storage.ensure_size(blob->m_size);
14 h_storage.copy_from(const_cast<DeviceTensorStorage&>(d_storage), blob->m_size);
15}
16
17void BlobManagerImpl::register_blob(OwnedBlob* blob) {
18 // add blob into the comp2blobs map

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected