Skip to content

Error Handling: replace XLA_CHECK_OK() with status functions. #9457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

ysiraichi
Copy link
Collaborator

@ysiraichi ysiraichi commented Jul 9, 2025

This PR introduces the following changes:

  1. Replaces the existing XLA_CHECK_OK() macro with MaybeThrow() and GetValueOrThrow() functions
  2. Replaces XLA_CHECK*() with ABSL_CHECK*() macro calls.

These changes improve error handling by not crashing when non-ok status values are returned (1), and by crashing on internal errors (2).

@ysiraichi ysiraichi marked this pull request as ready for review July 9, 2025 15:42
@ysiraichi
Copy link
Collaborator Author

There are other XLA_CHECK_OK() occurrences that are addressed in other PRs:

  • ifrt_computation_client.cpp: #9429
  • pjrt_computation_client.cpp: #9429
  • pjrt_registry.cpp: #9419

@ysiraichi ysiraichi force-pushed the ysiraichi/replace-xla-check-ok branch from 6ec6a94 to 6b12898 Compare July 9, 2025 20:33
Copy link
Collaborator

@zhanyong-wan zhanyong-wan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ysiraichi ysiraichi force-pushed the ysiraichi/replace-xla-check-ok branch from 6b12898 to 7d13b31 Compare July 10, 2025 12:07
@ysiraichi ysiraichi merged commit 12e77e7 into master Jul 10, 2025
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants