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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Requesting support for aten::bitwise_right_shift for torch.onnx.export #126194

Closed
zjgarvey opened this issue May 14, 2024 · 2 comments
Closed
Labels
module: onnx Related to torch.onnx triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@zjgarvey
Copy link
Contributor

馃殌 The feature, motivation and pitch

When trying to export the hugging face models:

  • "jlsilva/facebook-opt-125m-gptq4bit"
  • "TheBloke/Llama-2-7B-GPTQ"

I get an error:

torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::bitwise_right_shift' to ONNX opset version 17 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.

And similarly for the later onnx opset_versions.

If possible, I'd like to request support for this op in the onnx exporter.

Alternatives

No response

Additional context

No response

@malfet malfet added module: onnx Related to torch.onnx triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 14, 2024
@titaiwangms
Copy link
Collaborator

Hi @zjgarvey,

We鈥檝e gone ahead and closed this issue because we think it can be resolved with our new torch.onnx.dynamo_export api. Please try that instead! If you still believe this issue is relevant, please feel free to reopen the issue and we will triage it as necessary. Please specify in a comment any updated information you may have so that we can address it effectively. We encourage you to try the latest pytorch-preview (nightly) version to see if it has resolved the issue, as we are constantly working to make the converter experience better for everyone!

Thanks,
ONNX Converter team

@sholevs66
Copy link

@zjgarvey Did you manage to export "TheBloke/Llama-2-7B-GPTQ" using 'torch.onnx.dynamo_export' ?
I'm getting other issues using it...

pytorchmergebot pushed a commit that referenced this issue May 22, 2024
Addresses #126194

Adds support for
- "aten::bitwise_right_shift"
- "aten::bitwise_left_shift"
- "aten::bitwise_and"

Pull Request resolved: #126229
Approved by: https://github.com/justinchuby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: onnx Related to torch.onnx triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants