| 73 | } |
| 74 | |
| 75 | string DeviceName(const Node* node) { |
| 76 | char first = node->name()[0]; |
| 77 | if (first == 'G') { |
| 78 | return gpu_device; |
| 79 | } else { |
| 80 | const string cpu_prefix = "/job:a/replica:0/task:0/cpu:"; |
| 81 | int index = first - 'A'; |
| 82 | return strings::StrCat(cpu_prefix, index); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | void Partition(const GraphDef& graph_def, |
| 87 | std::unordered_map<string, GraphDef>* partitions) { |
no test coverage detected