diff --git a/torch_xla/csrc/dl_convertor.cpp b/torch_xla/csrc/dl_convertor.cpp index 7eff5a06b00..b6e0d23655a 100644 --- a/torch_xla/csrc/dl_convertor.cpp +++ b/torch_xla/csrc/dl_convertor.cpp @@ -138,9 +138,7 @@ DLManagedTensor* toDLPack(const at::Tensor& input) { auto external_ref = pjrt_buffer->AcquireExternalReference(); XLA_CHECK_OK(external_ref.status()); pack->external_reference = std::move(external_ref.value()); - xla::PjRtFuture<> future = pjrt_buffer->GetReadyFuture(); - absl::Status status = future.Await(); - XLA_CHECK_OK(status); + XLA_CHECK_OK(pjrt_buffer->GetReadyFuture().Await()); } pack->buffer_reference = pjrt_buffer; diff --git a/torch_xla/csrc/unwrap_data.h b/torch_xla/csrc/unwrap_data.h index 7d5080e84bf..6bf1cc60e0a 100644 --- a/torch_xla/csrc/unwrap_data.h +++ b/torch_xla/csrc/unwrap_data.h @@ -11,6 +11,9 @@ namespace torch_xla { +runtime::ComputationClient::DataPtr UnwrapXlaData( + const torch::lazy::BackendDataPtr& data); + std::vector UnwrapXlaData( absl::Span datas);