Skip to content

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

Merged
LysandreJik merged 3 commits intohuggingface:masterfrom
fatcat-z:add_xsoftmax_symbolic
Oct 26, 2021
Merged

[ONNX] Add symbolic function for XSoftmax op for exporting to ONNX.#14013
LysandreJik merged 3 commits intohuggingface:masterfrom
fatcat-z:add_xsoftmax_symbolic

Conversation

@fatcat-z
Copy link
Copy Markdown
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
Copy Markdown
Member

Might be of interest to @BigBird01

@BigBird01
Copy link
Copy Markdown
Contributor

Might be of interest to @BigBird01

This is cool! Thanks!

@fatcat-z
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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