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

Method StartCollect

tensorflow/core/common_runtime/gpu_memory_planner.cc:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void GPUMemoryPlanner::StartCollect() {
86 if (is_stats_.load()) {
87 BestFit();
88 ResetStats();
89 }
90
91 auto current = counter_.fetch_add(1);
92 if (current == start_step_) {
93 is_stats_ = true;
94 } else if (current == stop_step_) {
95 is_stats_ = false;
96 CollectDone();
97 }
98 if (allocator_ != nullptr) {
99 allocator_->BeginStep();
100 }
101}
102
103void GPUMemoryPlanner::BestFit() {
104 for (auto policy : lifetime_stats_polices_) {

Callers

nothing calls this directly

Calls 2

BeginStepMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected