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

[onnx] Import onnx constants as onnx.Constant instead of literals #2831

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

rsuderman
Copy link
Contributor

To handle the conversion from raw bytes to DenseElementsAttr we need
to handle the endianness conversion during torch-onnx-to-torch.
Therefore when importing onnx.Constant it is better to represent using
the onnx constant operation so that only one location requires the
endianness correction.

To handle the conversion from raw bytes to `DenseElementsAttr` we need
to handle the endianness conversion during `torch-onnx-to-torch`.
Therefore when importing `onnx.Constant` it is better to represent using
the `onnx` constant operation so that only one location requires the
endianness correction.
Copy link
Collaborator

@renxida renxida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough

@rsuderman rsuderman merged commit 54e2587 into llvm:main Jan 31, 2024
3 checks passed
@rsuderman rsuderman deleted the onnx_constant branch January 31, 2024 19:41
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

Successfully merging this pull request may close these issues.

2 participants