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

Function GetGpuNumber

tensorflow/compiler/jit/xla_cluster_util.cc:252–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252int GetGpuNumber(const string& device_name) {
253 DeviceNameUtils::ParsedName parsed_name;
254 if (!DeviceNameUtils::ParseFullName(device_name, &parsed_name)) {
255 return -1;
256 }
257
258 return parsed_name.type == DEVICE_GPU ? parsed_name.id : -1;
259}
260} // namespace
261
262bool IsSingleGpuGraph(const Graph& g) {

Callers 1

IsSingleGpuGraphFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected