MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / Save

Method Save

paddle/phi/core/memory/allocation/meta_cache.cc:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void MetadataCache::Save(MemoryBlock* block,
48 const MemoryBlock::Desc& original_desc) {
49 auto desc = original_desc;
50 desc.UpdateGuards();
51
52 if (uses_gpu_) {
53 cache_[block] = desc;
54 } else {
55 *reinterpret_cast<MemoryBlock::Desc*>(block) = desc;
56 }
57}
58
59void MetadataCache::Invalidate(MemoryBlock* block) {
60 if (uses_gpu_) {

Callers 3

InitMethod · 0.45
SplitMethod · 0.45
MergeMethod · 0.45

Calls 1

UpdateGuardsMethod · 0.80

Tested by

no test coverage detected