jax
ffcc5ea9 - jaxlib: Expose the status attributes on XlaRuntimeError.

Commit
199 days ago
jaxlib: Expose the status attributes on XlaRuntimeError. The exception message is unchanged, as verified by a battery of existing unit tests. The actual absl::Status itself can't be exposed because the type caster would turn it into another exception, but we can expose the code/message and a simple string form that matches the current setup. Any XlaRuntimeError that doesn't have a Status will report UNKNOWN and the string passed to it, as that seems like an easier default than propagating the optional nature. XLA isn't making compatibility guarantees at this point on the contents of these attributes, so code that looks at them may need to be updated over time, but that's no different (and less hacky) than checking e.args[0] for the string message. PiperOrigin-RevId: 881546012
Author
Parents
Loading