Skip to content

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

Merged
ysiraichi merged 1 commit intomasterfrom
ysiraichi/replace-xla-check-ok
Jul 10, 2025
Merged

Error Handling: replace XLA_CHECK_OK() with status functions.#9457
ysiraichi merged 1 commit intomasterfrom
ysiraichi/replace-xla-check-ok

Conversation

@ysiraichi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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