Skip to content

Error Handling: refactor the PjRt registry to use status QOL functions. #9419

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

Draft
wants to merge 1 commit into
base: ysiraichi/status-qol-functions
Choose a base branch
from

Conversation

ysiraichi
Copy link
Collaborator

This PR replaces XLA_CHECK* macros with XLA_ASSIGN_OR_RETURN and XLA_RETURN_IF_ERROR for better error handling. In summary, InitializePjRt() function now returns StatusOr<T>, propagating the error status instead of throwing on errors.

@ysiraichi ysiraichi force-pushed the ysiraichi/status-for-pjrt-registry branch 2 times, most recently from 9663a01 to 3302da5 Compare June 28, 2025 14:28
Replace `XLA_CHECK` macros with `XLA_ASSIGN_OR_RETURN` and
`XLA_RETURN_IF_ERROR` for better error handling:
- `InitializePjRt()` now returns `StatusOr<T>` instead of throwing on
errors
- Enhanced error messages with location context
- Consistent error handling across all device types
@ysiraichi
Copy link
Collaborator Author

Blocked until #9386 is merged.

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.

1 participant