MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RecordRawAllocation

Method RecordRawAllocation

tensorflow/core/framework/log_memory.cc:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void LogMemory::RecordRawAllocation(const string& operation,
78 const int64 step_id, size_t num_bytes,
79 void* ptr, Allocator* allocator) {
80 MemoryLogRawAllocation allocation;
81 allocation.set_step_id(step_id);
82 allocation.set_operation(operation);
83 allocation.set_num_bytes(static_cast<int64>(num_bytes));
84 allocation.set_ptr(reinterpret_cast<uintptr_t>(ptr));
85 allocation.set_allocation_id(allocator->AllocationId(ptr));
86 allocation.set_allocator_name(allocator->Name());
87 OutputToLog(allocation);
88}
89
90void LogMemory::RecordRawDeallocation(const string& operation,
91 const int64 step_id, void* ptr,

Callers

nothing calls this directly

Calls 4

OutputToLogFunction · 0.85
set_step_idMethod · 0.80
AllocationIdMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected