| 400 | } |
| 401 | |
| 402 | StatusOr<std::vector<std::unique_ptr<GlobalData>>> Client::DeconstructTuple( |
| 403 | const GlobalData& data) { |
| 404 | DeconstructTupleRequest request; |
| 405 | *request.mutable_tuple_handle() = data.handle(); |
| 406 | DeconstructTupleResponse response; |
| 407 | |
| 408 | VLOG(1) << "making DestructTuple request"; |
| 409 | Status s = stub_->DeconstructTuple(&request, &response); |
| 410 | VLOG(1) << "done with request"; |
| 411 | |
| 412 | if (!s.ok()) { |
| 413 | return s; |
| 414 | } |
| 415 | |
| 416 | std::vector<std::unique_ptr<GlobalData>> handles; |
| 417 | for (auto& handle : response.element_handles()) { |
| 418 | handles.push_back(absl::make_unique<GlobalData>(stub_, handle)); |
| 419 | } |
| 420 | return std::move(handles); |
| 421 | } |
| 422 | |
| 423 | StatusOr<ComputationStats> Client::GetComputationStats( |
| 424 | const XlaComputation& computation, |