Skip to content

Conversation

jiafatom
Copy link
Contributor

_register_custom_op set _onnx_opset_version=11, so we need import squeeze, etc from symbolic_opset11.

from torch.onnx.symbolic_helper import parse_args, scalar_type_to_onnx, scalar_type_to_pytorch_type, \
cast_pytorch_to_onnx
from torch.onnx.symbolic_opset9 import select, unsqueeze, squeeze, _cast_Long, reshape
from torch.onnx.symbolic_opset9 import _cast_Long
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the PR @jiafatom , I'm wondering, why leaving this one to opset9?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no _cast_Long in torch.onnx.symbolic_opset11. Not every function can be found in upper opsets torch.onnx.symbolic_opset11. We only updated if there is spec change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NicolasHug Can we merge the PR? thanks!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @jiafatom !

@NicolasHug NicolasHug merged commit 7de6265 into pytorch:master Aug 12, 2021
facebook-github-bot pushed a commit that referenced this pull request Aug 20, 2021
Reviewed By: NicolasHug

Differential Revision: D30417189

fbshipit-source-id: ca50850c51d083cd0e9e4b8c93abfba10d4af7bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants