Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
iree-import-onnx
operation/module usage. (iree-org#16622)
This broke when we pulled in llvm/torch-mlir#2795 as part of iree-org#16481, with errors like this: ``` Traceback (most recent call last): File "/usr/local/bin/iree-import-onnx", line 8, in <module> sys.exit(_cli_main()) File "/usr/local/lib/python3.10/dist-packages/iree/compiler/tools/import_onnx/__main__.py", line 83, in _cli_main sys.exit(main(parse_arguments())) File "/usr/local/lib/python3.10/dist-packages/iree/compiler/tools/import_onnx/__main__.py", line 46, in main imp = onnx_importer.NodeImporter.define_function(model_info.main_graph, m) File "/usr/local/lib/python3.10/dist-packages/iree/compiler/extras/onnx_importer.py", line 203, in define_function body = module_op.regions[0].blocks[0] AttributeError: 'iree.compiler._mlir_libs._mlir.ir.Module' object has no attribute 'regions' ``` The type information is also wrong on `create_module` - will send a fix for that to torch-mlir. The test isn't running on any of our CI jobs since it soft fails if the `onnx` Python package is not installed. I don't see an easy path to turning the test on right now, so just unblocking other work using this. More discussion here: https://discord.com/channels/689900678990135345/706175572920762449/1212833027630047272
- Loading branch information