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
()
| 112 | // BackingDeviceName. This function will block till the operation that produces |
| 113 | // th has completed. |
| 114 | func (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 |