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

Function DeviceName

tensorflow/core/util/device_name_utils.cc:89–99  ·  view source on GitHub ↗

Returns a fully qualified device name given the parameters.

Source from the content-addressed store, hash-verified

87
88// Returns a fully qualified device name given the parameters.
89static string DeviceName(const string& job, int replica, int task,
90 const string& device_prefix, const string& device_type,
91 int id) {
92 CHECK(IsJobName(job)) << job;
93 CHECK_LE(0, replica);
94 CHECK_LE(0, task);
95 CHECK(!device_type.empty());
96 CHECK_LE(0, id);
97 return strings::StrCat("/job:", job, "/replica:", replica, "/task:", task,
98 device_prefix, device_type, ":", id);
99}
100
101/* static */
102string DeviceNameUtils::FullName(const string& job, int replica, int task,

Callers 2

FullNameMethod · 0.70
LegacyNameFunction · 0.70

Calls 3

IsJobNameFunction · 0.85
StrCatFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected