Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version pin to onnx 1.16 #3310

Open
stellaraccident opened this issue May 9, 2024 · 4 comments
Open

Update version pin to onnx 1.16 #3310

stellaraccident opened this issue May 9, 2024 · 4 comments
Assignees

Comments

@stellaraccident
Copy link
Collaborator

onnx 1.16 includes support for Python 3.12. We should upgrade. Based on a user report, there may need to be some cleanup.

@zjgarvey
Copy link
Collaborator

zjgarvey commented May 9, 2024

Just to verify, you would like me to

  1. pin onnx==1.16.0 in test-requirements.txt
  2. check for e2e test regressions with config onnx and fix them
  3. setup building nightly python wheels for python version 3.12
  4. anything else?

@stellaraccident
Copy link
Collaborator Author

That's it.

@zjgarvey
Copy link
Collaborator

zjgarvey commented May 9, 2024

Sounds good. Thanks.

@stellaraccident
Copy link
Collaborator Author

FYI - making this change and then ninja check-torch-mlir yields issues.

Here is a subset:

======================================================================                                                                                                                              ERROR: test_node_test_cast_INT4_to_FLOAT16_model (__main__.ImportSmokeTest.test_node_test_cast_INT4_to_FLOAT16_model)                                                                               ----------------------------------------------------------------------                                                                                                                              Traceback (most recent call last):                                                                                                                                                                    File "/home/stella/src/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir/extras/onnx_importer.py", line 484, in tensor_element_type                                             t = ELEM_TYPE_TO_IR_TYPE_CB[elem_type]()                                                                                                                                                                ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^                                                                                                                                                          KeyError: 22                                                                                                                                                                                                                                                                                                                                                                                            During handling of the above exception, another exception occurred:                                                                                                                                                                                                                                                                                                                                     Traceback (most recent call last):                                                                                                                                                                    File "/home/stella/src/torch-mlir/test/python/onnx_importer/import_smoke_test.py", line 128, in test_method                                                                                           raise e                                                                                                                                                                                           File "/home/stella/src/torch-mlir/test/python/onnx_importer/import_smoke_test.py", line 121, in test_method                                                                                           self.run_import_test(norm_name, rel_path)                                                                                                                                                         File "/home/stella/src/torch-mlir/test/python/onnx_importer/import_smoke_test.py", line 99, in run_import_test                                                                                        imp = onnx_importer.NodeImporter.define_function(model_info.main_graph, m)                                                                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                        File "/home/stella/src/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir/extras/onnx_importer.py", line 205, in define_function                                                 cc.type_proto_to_type(inp.type) for inp in graph_info.input_map.values()                                                                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                   File "/home/stella/src/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir/extras/onnx_importer.py", line 590, in type_proto_to_type                                              element_type = self.tensor_element_type(tt.elem_type)                                                                                                                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                             File "/home/stella/src/torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir/extras/onnx_importer.py", line 486, in tensor_element_type                                             raise OnnxImportError(f"Unknown ONNX tensor element type: {elem_type}")                                                                                                                         torch_mlir.extras.onnx_importer.OnnxImportError: Unknown ONNX tensor element type: 22

Some others that look related. Seems like some API/type adaptation needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants