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

Method SetMemory

tensorflow/core/common_runtime/step_stats_collector.cc:151–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void NodeExecStatsWrapper::SetMemory(OpKernelContext* ctx) {
152 for (const auto& allocator_pair : ctx->ConsumeWrappedAllocators()) {
153 AddAllocation(allocator_pair.first, allocator_pair.second);
154 }
155 auto* ms = stats_->mutable_memory_stats();
156 ms->set_temp_memory_size(ctx->temp_memory_allocated());
157 for (const auto& alloc_id : ctx->persistent_alloc_ids()) {
158 ms->mutable_persistent_tensor_alloc_ids()->Add(alloc_id);
159 }
160 ms->set_persistent_memory_size(ctx->persistent_memory_allocated());
161}
162
163void NodeExecStatsWrapper::SetOutput(int slot, const Tensor* tensor) {
164 DCHECK(tensor);

Callers 1

SetMemoryFunction · 0.45

Calls 5

temp_memory_allocatedMethod · 0.80
persistent_alloc_idsMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected