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] Add symbolic function for XSoftmax op for exporting to ONNX. #14013

Merged
merged 3 commits into from
Oct 26, 2021
Merged

[ONNX] Add symbolic function for XSoftmax op for exporting to ONNX. #14013

merged 3 commits into from
Oct 26, 2021

Conversation

fatcat-z
Copy link
Contributor

What does this PR do?

For such customized operator, PyTorch ONNX exporter will try to call its symbolic() function for exporting to ONNX file. Add the implementation here so that it could be exported successfully.

@LysandreJik
Copy link
Member

Might be of interest to @BigBird01

@BigBird01
Copy link
Contributor

Might be of interest to @BigBird01

This is cool! Thanks!

@fatcat-z
Copy link
Contributor Author

@BigBird01
The latest CI failure seems like is not relative to my changes. Could you please take a review and see if we can merge this change?

Thanks.

Copy link
Member

@michaelbenayoun michaelbenayoun left a comment

Choose a reason for hiding this comment

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

Seems good to me, thanks for your great contribution!

Quick question: do you plan to add the ONNX DeBERTa export support now that you have added support for the problematic operator?

@fatcat-z
Copy link
Contributor Author

Seems good to me, thanks for your great contribution!

Quick question: do you plan to add the ONNX DeBERTa export support now that you have added support for the problematic operator?

No, no plan for this yet.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Yes, LGTM! Thank you @fatcat-z

@LysandreJik LysandreJik merged commit 3f23634 into huggingface:master Oct 26, 2021
@fatcat-z fatcat-z deleted the add_xsoftmax_symbolic branch October 27, 2021 02:11
@pommedeterresautee
Copy link
Contributor

@fatcat-z Hi, I have a question about the way symbolic conversion is implemented. Is there any reason why you are using uint8 type for some values?
It seems to me to work with signed integers, and uint8 is not supported by TensorRT (it only supports signed integers).

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.

5 participants