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

Method ClearContainers

tensorflow/core/common_runtime/device_mgr.cc:117–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void DeviceMgr::ClearContainers(gtl::ArraySlice<string> containers) const {
118 Status s;
119 for (const auto& dev : devices_) {
120 if (containers.empty()) {
121 s.Update(dev->resource_manager()->Cleanup(
122 dev->resource_manager()->default_container()));
123 } else {
124 for (const string& c : containers) {
125 s.Update(dev->resource_manager()->Cleanup(c));
126 }
127 }
128 if (!s.ok()) {
129 LOG(WARNING) << s;
130 }
131 }
132}
133
134int DeviceMgr::NumDeviceType(const string& type) const {
135 auto iter = device_type_counts_.find(type);

Callers 3

ResetMethod · 0.80
CleanupAllAsyncMethod · 0.80

Calls 5

emptyMethod · 0.45
UpdateMethod · 0.45
CleanupMethod · 0.45
resource_managerMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected