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

Function GetDeviceNamePrefix

tensorflow/core/graph/stream_subgraph.cc:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::string GetDeviceNamePrefix(const std::string& device_name) {
35 std::string prefix_token("device:GPU:");
36 auto idx = device_name.find(prefix_token);
37 if (idx == std::string::npos) {
38 LOG(FATAL) << "Error device name, " << device_name;
39 }
40 std::string device_name_prefix =
41 device_name.substr(0, idx + prefix_token.length());
42
43 return device_name_prefix;
44}
45
46} // namesapce
47

Callers 1

MarkEmbeddingGraphFunction · 0.85

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected