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

fix: fix the parsing related model loading bug #1148

Merged
merged 2 commits into from
Jul 25, 2022
Merged

fix: fix the parsing related model loading bug #1148

merged 2 commits into from
Jul 25, 2022

Conversation

bowang007
Copy link
Collaborator

@bowang007 bowang007 commented Jun 28, 2022

Signed-off-by: Bo Wang bowa@nvidia.com

Description

When there is fallback, the converted model will contain input names that inherited from loweredGraph, such as x.1.
These names cannot be parsed by torch.jit.load().
This induces some errors like: #973 , #1112 .
We stop using the names from loweredGraph, we use the input names that are similar to what we are using when there is no fallback: input_0, input_1, ..

Fixes #973, #1112

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

Signed-off-by: Bo Wang <bowa@nvidia.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

@bowang007
Copy link
Collaborator Author

root cause explained here: https://github.com/pytorch/TensorRT/pull/1109/files#r903199440

Signed-off-by: Bo Wang <bowa@nvidia.com>
@github-actions github-actions bot added the component: tests Issues re: Tests label Jul 5, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

@bowang007
Copy link
Collaborator Author

Decided to fix it after fallback, since things could become complex to rename the input in upstream code for if blocks

@narendasan narendasan added the release: v1.2 Tagged to be included in v1.2 label Jul 15, 2022
@github-actions github-actions bot requested a review from andi4191 July 15, 2022 01:17
@narendasan narendasan added the Story: Binding Names Issues related to binding names, format and uniqueness label Jul 15, 2022
@peri044 peri044 merged commit e07687d into master Jul 25, 2022
@bowang007 bowang007 deleted the fix_parsing branch July 26, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: core Issues re: The core compiler component: tests Issues re: Tests release: v1.2 Tagged to be included in v1.2 Story: Binding Names Issues related to binding names, format and uniqueness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] Error while loading Torch-TensorRT model (torch.jit.load)
4 participants