Skip to content

Commit

Permalink
Output tensorid before erroring out for empty data handle (#7176)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackCaoG authored Jun 4, 2024
1 parent bcf46c7 commit 376d645
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_xla/csrc/tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ torch::lazy::BackendDataPtr XLATensor::GetXlaData() {
torch::lazy::BackendDataPtr handle = CurrentDataHandle();
if (handle != nullptr) {
XLA_CHECK(handle->HasValue())
<< "Trying to access XLA data while an async operation is in flight: "
<< handle->shape();
<< "Trying to access XLA data for tensor with ID " << GetUniqueId()
<< " while an async operation is in flight: " << handle->shape();
return handle;
}
}
Expand Down

0 comments on commit 376d645

Please sign in to comment.