[all-commits] [llvm/llvm-project] 73257e: [mlir][python] Correctly handle python passes that...
Stella Laurenzo via All-commits
all-commits at lists.llvm.org
Thu Jun 27 19:29:40 PDT 2024
Branch: refs/heads/users/stellaraccident/mlir_py_pass_assert_fix
Home: https://github.com/llvm/llvm-project
Commit: 73257ee16a7f030d98d9b631fd7753b65c3946e9
https://github.com/llvm/llvm-project/commit/73257ee16a7f030d98d9b631fd7753b65c3946e9
Author: Stella Laurenzo <stellaraccident at gmail.com>
Date: 2024-06-27 (Thu, 27 Jun 2024)
Changed paths:
M mlir/lib/Bindings/Python/Pass.cpp
Log Message:
-----------
[mlir][python] Correctly handle python passes that emit errors without signalling failure.
It was previously possible for a pass to emit errors, which would be collected by the diagnostic handler. But if it did not then signal failure, this would trigger an assert (because the diagnostic handler collected errors which were not consumed).
There aren't great things to do in this case. After trying some options, I opted for just issuing a Python level warning when this happens. This isn't great but includes a way to further debug and doesn't change semantics on what actually constitutes an error from the API standpoint. It will at least be visible and is better than an assert.
Fixes https://github.com/llvm/torch-mlir/issues/3506 properly.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list