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

Method TransferToServer

tensorflow/compiler/xla/client/client.cc:68–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68StatusOr<std::unique_ptr<GlobalData>> Client::TransferToServer(
69 const LiteralSlice& literal, const DeviceHandle* device_handle) {
70 TransferToServerRequest request;
71 *request.mutable_literal() = literal.ToProto();
72 if (device_handle) {
73 *request.mutable_device_handle() = *device_handle;
74 }
75 TransferToServerResponse response;
76
77 VLOG(1) << "making transfer to server request";
78 VLOG(3) << "TransferToServerRequest: {" << request.DebugString() << "}";
79 Status s = stub_->TransferToServer(&request, &response);
80 VLOG(1) << "done with request";
81
82 if (!s.ok()) {
83 return s;
84 }
85 VLOG(3) << "TransferToServerResponse: {" << response.DebugString() << "}";
86
87 if (!response.has_data()) {
88 return FailedPrecondition(
89 "server provided response without a data handle in "
90 "TransferToServer request");
91 }
92
93 return absl::make_unique<GlobalData>(stub_, response.data());
94}
95
96Status Client::TransferToInfeed(const LiteralSlice& literal, int64 replica_id,
97 const DeviceHandle* device_handle) {

Callers 15

TESTFunction · 0.45
TEST_FFunction · 0.45
XLA_TEST_FFunction · 0.45
MakeFakeDataOrDieFunction · 0.45
XLA_TEST_FFunction · 0.45
XLA_TEST_FFunction · 0.45
TEST_PFunction · 0.45
XLA_TEST_FFunction · 0.45
XLA_TEST_FFunction · 0.45
XLA_TEST_FFunction · 0.45
XLA_TEST_FFunction · 0.45

Calls 5

FailedPreconditionFunction · 0.85
ToProtoMethod · 0.45
DebugStringMethod · 0.45
okMethod · 0.45
dataMethod · 0.45

Tested by 15

TESTFunction · 0.36
TEST_FFunction · 0.36
XLA_TEST_FFunction · 0.36
MakeFakeDataOrDieFunction · 0.36
XLA_TEST_FFunction · 0.36
XLA_TEST_FFunction · 0.36
TEST_PFunction · 0.36
XLA_TEST_FFunction · 0.36
XLA_TEST_FFunction · 0.36
XLA_TEST_FFunction · 0.36
XLA_TEST_FFunction · 0.36