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

Enable dynamo onnx export of BasicUNet #7640

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

asfiyab-nvidia
Copy link

@asfiyab-nvidia asfiyab-nvidia commented Apr 13, 2024

Enable dynamo onnx export of BasicUNet models

TorchDynamo based ONNX export does not support torch.jit.isinstance(). To enable the export via dynamo, I've updated the calls to torch.jit.isinstance to isinstance.

Note: I've also verified that the TorchScript based ONNX export still works with this change. These changes enable the export of BasicUNet, BasicUNetPlusPlus, FlexibleUNet, TorchvisionFC models.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage. - Errors caused due to dataloader
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests. - Errors caused due to dataloader

Signed-off-by: Asfiya Baig <asfiyab@nvidia.com>
@ericspod
Copy link
Member

Judging from the errors you do need to specify Dict with the contained types even though you're explicitly checking for these and Python's isinstance won't use them.

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.

None yet

2 participants