summaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
diff options
context:
space:
mode:
authorAshay Rane <ashay@users.noreply.github.com>2022-09-28 14:53:36 +0000
committerAshay Rane <ashay@users.noreply.github.com>2022-09-29 03:02:24 +0000
commitb947e15a577f72284d69d077cfdb2d3f211abe65 (patch)
tree5d7e6b62a55f6285d078f22299e1591dc88baf50 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp
parent9e6840ccbae5c8e34e6aaa417b8e6cf4a60facf3 (diff)
[mlir][python] stop initialization on ImportError
An `_mlirRegisterEverything.*.so` file from an old build that referenced `MLIRPythonExtension.RegisterEverything`, but which no longer references that extension in a new build, causes runtime errors in the new build like: ImportError: _mlirRegisterEverything.cpython-38-x86_64-linux-gnu.so: undefined symbol: mlirRegisterAllPasses The error occurs because the MLIR Python binding tries to dynamically import the `_mlirRegisterEverything` module but the dynamic importer fails since the new build no longer references `MLIRPythonExtension.RegisterEverything`. One possible solution is for the user to manually remove the `_mlirRegisterEverything.*.so` file. This patch instead resolves the problem in code by printing a waning if the module cannot be imported. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D133450
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
0 files changed, 0 insertions, 0 deletions