| 128 | } |
| 129 | |
| 130 | void GPUMemoryPlanner::CollectDone() { |
| 131 | Schedule([this]() { |
| 132 | if (allocator_ != nullptr) { |
| 133 | allocator_->Init(); |
| 134 | } |
| 135 | Cleanup(); |
| 136 | inited_ = true; |
| 137 | }); |
| 138 | } |
| 139 | |
| 140 | void GPUMemoryPlanner::Cleanup() { |
| 141 | for (auto policy : lifetime_stats_polices_) { |