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

Method DeviceMappingString

tensorflow/core/common_runtime/device_mgr.cc:91–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91string DeviceMgr::DeviceMappingString() const {
92 string out;
93 for (const auto& dev : devices_) {
94 if (!dev->attributes().physical_device_desc().empty()) {
95 strings::StrAppend(&out, dev->name(), " -> ",
96 dev->attributes().physical_device_desc(), "\n");
97 }
98 }
99 return out;
100}
101
102Status DeviceMgr::LookupDevice(StringPiece name, Device** device) const {
103 auto iter = device_map_.find(name);

Callers 1

DirectSessionMethod · 0.80

Calls 3

nameMethod · 0.65
StrAppendFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected