| 17 | namespace tensorflow { |
| 18 | |
| 19 | tensorflow::Status EagerOperation::SetDeviceName(const char* device) { |
| 20 | if (device != nullptr && strlen(device) > 0) { |
| 21 | if (!DeviceNameUtils::ParseFullName(device, &device_name_)) { |
| 22 | return errors::InvalidArgument("Malformed device specification '", device, |
| 23 | "' in eager op: ", DebugString()); |
| 24 | } |
| 25 | } |
| 26 | return Status::OK(); |
| 27 | } |
| 28 | |
| 29 | void EagerOperation::AddInput(tensorflow::TensorHandle* h) { |
| 30 | h->Ref(); |
no test coverage detected