🐛 Bug
If XLA fails to compile a program and returns a Status error, PyTorch/XLA should handle it gracefully (e.g. by raising an appropriate Python exception) instead of crashing.
To Reproduce
See
|
executable = |
|
client_->CompileAndLoad(mlir_module, compile_options).value(); |
|
StableHloCompileCounter()->AddValue(1); |
|
} else { |
|
executable = |
|
client_->CompileAndLoad(instance.computation, compile_options) |
|
.value(); |
-
CompileAndLoad(...).value() will crash if
CompileAndLoad(...) returns an error. We should check for error before getting the value.
🐛 Bug
If XLA fails to compile a program and returns a Status error, PyTorch/XLA should handle it gracefully (e.g. by raising an appropriate Python exception) instead of crashing.
To Reproduce
See
xla/torch_xla/csrc/runtime/pjrt_computation_client.cc
Lines 635 to 641 in a45a05a
CompileAndLoad(...).value()will crash ifCompileAndLoad(...)returns an error. We should check for error before getting the value.