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
Extend assert statement to include ListVariable #100841
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/100841
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5bdcbcc: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
torch/_dynamo/variables/torch.py
Outdated
output_tensor_names = [ | ||
tx.find_symbolic_locals_name(x) for x in kwargs["out"].items | ||
] | ||
for idx, name in enumerate(output_tensor_names): | ||
if name in tx.symbolic_locals: | ||
tx.symbolic_locals[name] = tensor_variable.items[idx] | ||
elif isinstance(tensor_variable, TensorVariable): | ||
assert isinstance(kwargs["out"], TensorVariable) | ||
assert isinstance(kwargs["out"], (TensorVariable, ListVariable)) |
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.
In which case can we hit the ListVariable
here?
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, that is just an artifact that I have forgotten to remove . I am pretty sure there is no way to hit ListVariable
in elif
. I will remove that.
@pytorchbot merge |
Merge failedReason: This PR needs a label If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes #100697
cc @ezyang @soumith @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @desertfire