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

Method GPULifetimePolicy

tensorflow/core/common_runtime/gpu_memory_planner.cc:231–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231GPULifetimePolicy::GPULifetimePolicy(size_t interval,
232 size_t interval_offset, size_t start) :
233 interval_(interval), interval_offset_(interval_offset), start_(start),
234 large_bin_index_(Index(_32MB, interval_, interval_offset_) + 1) {
235 auto cur = start_ + interval_;
236 bins_.resize(large_bin_index_);
237 for (auto i = 0; i < large_bin_index_; ++i) {
238 bins_[i] = new GPULifetimeBin(i, cur);
239 cur += interval_;
240 }
241}
242
243void GPULifetimePolicy::TrackAllocate(size_t alignment, size_t num_bytes) {
244 auto index = Index(num_bytes, interval_, interval_offset_);

Callers

nothing calls this directly

Calls 2

IndexFunction · 0.70
resizeMethod · 0.45

Tested by

no test coverage detected