Home | History | Annotate | Download | only in util

Lines Matching defs:device

58 // Returns true and fills in "*device_type" iff "*in" starts with a device type
88 // Returns a fully qualified device name given the parameters.
104 return DeviceName(job, replica, task, "/device:", type, id);
142 if (str_util::ConsumePrefix(&fullname, "/device:")) {
162 p->type = "CPU"; // Treat '/cpu:..' as uppercase '/device:CPU:...'
172 p->type = "GPU"; // Treat '/gpu:..' as uppercase '/device:GPU:...'
223 " into a device specification.");
244 " into a device "
255 strings::StrAppend(&buf, "/device:", pn.type, ":");
426 return strings::StrCat("/device:", type, ":", id);
430 // Returns the legacy local device name given its "type" and "id" (which is
431 // '/device:type:id').
462 string* device) {
479 device->clear();
480 strings::StrAppend(device, pn.type, ":", pn.id);
509 DeviceNameUtils::ParsedName device;
510 if (!DeviceNameUtils::ParseFullName(device_name, &device)) {
511 return errors::Internal("Could not parse device name ", device_name);
513 device.type = "CPU";
514 device.id = 0;
515 device);