Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid undefined behaviour in ElementwiseOpToLLVM
Triton uses the pattern `llvm:errs() << "Error message"; llvm::unreachable()` in some places. I suspect the author assumed that `llvm::errs()` aborts after printing the error message which it does not. So I replace the construct by `llvm::report_fatal_error("Error message")` instead which is used in many other places in the same file. This recently causes flakyness in the `TritonSupportTest` in XLA. In this test we rely on the fact that Triton aborts when reaching these code paths but since invoking `llvm:unreachable()` leads to undefined behaviour it not always aborts, but rather does something else. On ARM for example test sometimes deadlocks on ARM - which resulted in the observed flakyness. PiperOrigin-RevId: 694508541
- Loading branch information