| 88 | } |
| 89 | |
| 90 | bool IsCPU(const tensorflow::Device* d) { |
| 91 | return d == nullptr || d->tensorflow_gpu_device_info() == nullptr; |
| 92 | } |
| 93 | |
| 94 | string DeviceName(const tensorflow::Device* d) { |
| 95 | return (d == nullptr) ? "cpu:0" : d->name(); |
no test coverage detected