-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logaddexp for ONNX export (#1158)
- Loading branch information
1 parent
98d8946
commit c3e23ec
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c3e23ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still getting the
Exporting the operator 'aten::logaddexp' to ONNX opset version 13 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.
None
I don't have the problem with the version before this commit: 219bba1
c3e23ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. Will recheck it.
c3e23ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I cannot reproduce your issue. The latest master including this PR works perfectly for me.
FYI: I have used the following script for testing when creating this PR:
The output is given below:
The screenshot for the following command is
You can see that when using
torch.jit.script()
andtorch.jit.trace()
, it indeed is usingtorch.logaddexp()
for exporting.But for
torch.onnx.export()
, it is using our customized implementation.c3e23ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I am probably doing something wrong.
When i run your test script, i get the same output as you pasted above.
When i add some debug prints, i end up 3x in the
else:
return torch.logaddexp(x, y)
and the 4th time, i end up in
elif torch.onnx.is_in_onnx_export():
However when I run the onnx_export.py file:
I end up here 4 times:
else:
return torch.logaddexp(x, y)
c3e23ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. You are getting errors when running
export-onnx.py
, but I was testing withexport-onnnx-streaming.py
.I just ran
export-onnx.py
and got the same error as you. Please wait for a moment. Will try to fix it.