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

Method SetDeviceName

tensorflow/core/common_runtime/eager/eager_operation.cc:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace tensorflow {
18
19tensorflow::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
29void EagerOperation::AddInput(tensorflow::TensorHandle* h) {
30 h->Ref();

Callers 3

SetupNewOpMethod · 0.80
ExecuteOpMethod · 0.80
TFE_OpSetDeviceFunction · 0.80

Calls 2

InvalidArgumentFunction · 0.85
DebugStringFunction · 0.50

Tested by

no test coverage detected