-
Notifications
You must be signed in to change notification settings - Fork 24.9k
[Inductor] Fix remove_noop_ops pass where the types for the same_meta would differ #154460
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/154460
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a63a768 with merge base 53affa2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
Backtrace that lead me to this fix:
|
issubclass(type(val1), torch.Tensor) | ||
and issubclass(type(val2), torch.Tensor) |
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.
what is the difference between this and isinstance(val1, torch.Tensor)
@eellison we good to merge this ? |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
@pytorchmergebot merge |
Pull workflow has not been scheduled for the PR yet. It could be because author doesn't have permissions to run those or skip-checks keywords were added to PR/commits, aborting merge. Please get/give approval for the workflows and/or remove skip ci decorators before next merge attempt. If you think this is a mistake, please contact PyTorch Dev Infra. |
Summary: Fixes a bug where the type of
val1
andval2
for thesame_meta
function would differ. Leading to a compiler crash, since types other thanTensor
andFakeTensor
don't have the following attributes.The problem has been spotted by me in the wild, where
val2
would be of typeSymInt
, while the expected type isFakeTensor
. The setup is kinda convoluted to reproduce, but here are some other examples of people encountering this problem.This problem only showed up when I tried to compile a large model using
dynamic=True
, so it's related to that.chengzeyi/Comfy-WaveSpeed#18
openvinotoolkit/openvino#22412
pytorch/TensorRT#2356
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben