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

Method LookupDevice

tensorflow/core/common_runtime/device_mgr.cc:102–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102Status DeviceMgr::LookupDevice(StringPiece name, Device** device) const {
103 auto iter = device_map_.find(name);
104 if (iter == device_map_.end()) {
105 std::vector<StringPiece> device_names;
106 for (auto&& itr : device_map_) {
107 device_names.push_back(itr.first);
108 }
109 VLOG(1) << "Unknown device: " << name
110 << " all devices: " << absl::StrJoin(device_names, ", ");
111 return errors::InvalidArgument(name, " unknown device.");
112 }
113 *device = iter->second;
114 return Status::OK();
115}
116
117void DeviceMgr::ClearContainers(gtl::ArraySlice<string> containers) const {
118 Status s;

Callers 15

RecvFromRemoteAsyncMethod · 0.80
AddRequestMethod · 0.80
InitStarServerTagFunction · 0.80
RecvFromRemoteAsyncMethod · 0.80
RecvFromRemoteAsyncMethod · 0.80
PrepareRecvTensorMethod · 0.80
RecvFromRemoteAsyncMethod · 0.80
mainFunction · 0.80
DeviceInstanceMethod · 0.80
BufRendezvousTestMethod · 0.80

Calls 4

InvalidArgumentFunction · 0.85
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 10

mainFunction · 0.64
DeviceInstanceMethod · 0.64
BufRendezvousTestMethod · 0.64
DeviceInstanceMethod · 0.64
DeviceInstanceMethod · 0.64
TEST_FFunction · 0.64
DeviceInstanceMethod · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64