| 109 | } |
| 110 | |
| 111 | TensorHandle::TensorHandle(std::unique_ptr<LocalTensorHandleData> t, |
| 112 | DataType dtype, Device* d, Device* op_device, |
| 113 | EagerContext* ctx) |
| 114 | : dtype(dtype), |
| 115 | device_(d), |
| 116 | op_device_(op_device), |
| 117 | resource_device_(nullptr), |
| 118 | #if !defined(IS_MOBILE_PLATFORM) |
| 119 | remote_op_id_(kInvalidOpId), |
| 120 | remote_output_num_(kInvalidOutputNum), |
| 121 | #endif |
| 122 | ctx_(ctx), |
| 123 | is_remote_(false), |
| 124 | tensor_handle_data_(std::move(t)) { |
| 125 | VLOG(3) << "Creating Local TensorHandle: " << this << " device: " << device_; |
| 126 | // Notify immediately since this handle is already ready. |
| 127 | is_ready_notification_.Notify(); |
| 128 | } |
| 129 | |
| 130 | TensorHandle::TensorHandle(std::unique_ptr<LocalTensorHandleData> t, |
| 131 | const ResourceHandle& resource_handle, Device* d, |
no test coverage detected