Skip to content

Commit

Permalink
Remove stack dump for compiler failure which can happen often (#7207)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-162.us-west-2.compute.internal>
  • Loading branch information
jeffhataws and Ubuntu committed Jun 8, 2024
1 parent 1ac8968 commit 5338a3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions torch_xla/csrc/runtime/debug_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ T ConsumeValue(xla::StatusOr<T>&& status) {
return std::move(status).value();
}

template <typename T>
T ConsumeValueNoStackDump(xla::StatusOr<T>&& status) {
TF_CHECK_OK(status.status());
return std::move(status).value();
}

#endif // XLA_CLIENT_DEBUG_MACROS_H_
3 changes: 2 additions & 1 deletion torch_xla/csrc/runtime/pjrt_computation_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ std::vector<ComputationClient::ComputationPtr> PjRtComputationClient::Compile(
TF_VLOG(3) << "memory usage is not availiable";
}

const auto& hlo_modules = ConsumeValue(executable->GetHloModules());
const auto& hlo_modules =
ConsumeValueNoStackDump(executable->GetHloModules());
xla::HloComputation* hlo_computation = hlo_modules[0]->entry_computation();
std::shared_ptr<PjRtComputation> pjrt_computation =
std::make_shared<PjRtComputation>(
Expand Down

0 comments on commit 5338a3b

Please sign in to comment.