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

Method DeviceName

tensorflow/go/tensor_handle.go:114–121  ·  view source on GitHub ↗

DeviceName returns the name of the device of the operation that produced the TensorHandle. If the handle was produced by a copy, it returns the destination device of the copy. Note that returned device name is not always the device holding the tensor handle's memory. If you want the latter, use Back

()

Source from the content-addressed store, hash-verified

112// BackingDeviceName. This function will block till the operation that produces
113// th has completed.
114func (th *TensorHandle) DeviceName() (string, error) {
115 status := newStatus()
116 name := C.TFE_TensorHandleDeviceName(th.c, status.c)
117 if err := status.Err(); err != nil {
118 return "", err
119 }
120 return C.GoString(name), nil
121}
122
123// BackingDeviceName returns the name of the device in whose memory the tensor
124// handle resides. This function will block till the operation that produces

Callers 3

BackingDeviceNameMethod · 0.95

Calls 2

newStatusFunction · 0.85
ErrMethod · 0.45

Tested by 1