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

[Question] about how to get IR version (onnx surgeon) #3841

Closed
phamkhactu opened this issue May 6, 2024 · 3 comments
Closed

[Question] about how to get IR version (onnx surgeon) #3841

phamkhactu opened this issue May 6, 2024 · 3 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@phamkhactu
Copy link

Thanks for excellent repo.

I've encounter with problem. I convert model successfully from onnx to onnx surgeon graph. However, when I infer it, I get error:

    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from tts_surgeon.onnx failed:/onnxruntime_src/onnxruntime/core/graph/model.cc:146 onnxruntime::Model::Model(onnx::ModelProto&&, const PathString&, const IOnnxRuntimeOpSchemaRegistryList*, const onnxruntime::logging::Logger&, const onnxruntime::ModelOptions&) Unsupported model IR version: 9, max supported IR version: 8
``

My version:

  • onnx: 1.14.1
  • onnxruntime: 1.14.1
  • onnx surgeon: 0.5.2
With my check version from [onnxruntime](https://onnxruntime.ai/docs/reference/compatibility.html), I know that IR 8 is suitable for onnxruntime, but i dont know the way to check.

Thanks.
@phamkhactu phamkhactu changed the title [Question] about how to get IR version [Question] about how to get IR version (onnx surgeon) May 6, 2024
@phamkhactu
Copy link
Author

I change to IR 9 with onnxruntime=1.16.0 fixed this issue. But the time inference between pytorch --> onnx and onnx --> surgeon onnx the same. What do you think about it?

@zerollzeng
Copy link
Collaborator

Sorry I don't quite get the question, your issue seems caused by onnxruntime, am I correct?

@zerollzeng zerollzeng self-assigned this May 8, 2024
@zerollzeng zerollzeng added triaged Issue has been triaged by maintainers needs-info labels May 8, 2024
@phamkhactu
Copy link
Author

Hi @zerollzeng, Yes, it causes by version, and I fixed it by changing suitable IR version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants