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

Method TransferFromOutfeed

tensorflow/compiler/xla/client/client.cc:118–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118StatusOr<Literal> Client::TransferFromOutfeed(
119 const Shape* shape_with_layout, int64 replica_id,
120 const DeviceHandle* device_handle) {
121 TransferFromOutfeedRequest request;
122 if (device_handle) {
123 *request.mutable_device_handle() = *device_handle;
124 }
125 request.set_replica_id(replica_id);
126 if (shape_with_layout != nullptr) {
127 *request.mutable_shape_with_layout() = shape_with_layout->ToProto();
128 }
129 TransferFromOutfeedResponse response;
130
131 VLOG(1) << "making transfer from outfeed request";
132 VLOG(3) << "TransferFromOutfeedRequest: {" << request.DebugString() << "}";
133 Status s = stub_->TransferFromOutfeed(&request, &response);
134 VLOG(1) << "done with request";
135
136 if (!s.ok()) {
137 return s;
138 }
139 VLOG(3) << "TransferFromOutfeedResponse: {" << response.DebugString() << "}";
140
141 if (!response.has_literal()) {
142 return FailedPrecondition(
143 "server provided response without a literal in "
144 "TransferToClient request");
145 }
146
147 return Literal::CreateFromProto(response.literal());
148}
149
150Status Client::ResetDevice() {
151 ResetDeviceRequest request;

Callers 1

XLA_TEST_FFunction · 0.45

Calls 5

FailedPreconditionFunction · 0.85
ToProtoMethod · 0.45
DebugStringMethod · 0.45
okMethod · 0.45
literalMethod · 0.45

Tested by 1

XLA_TEST_FFunction · 0.36