-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Fake: fix conv_transpose2d striding #82846
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
Conversation
[ghstack-poisoned]
🔗 Helpful links
❌ 2 New FailuresAs of commit 658636d (more details on the Dr. CI page): Expand to see more
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages
|
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.
input sniffing is cool, we do it in other places too.
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda. You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic. [ghstack-poisoned]
torch/_meta_registrations.py
Outdated
return torch.channels_last | ||
elif input_tensor.is_contiguous(memory_format=torch.contiguous_format): | ||
def is_channels_last(ten): | ||
return ten.is_contiguous(memory_format=torch.channels_last) |
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.
This is too permissive, e.g. weight tensors with 1x1 kernel will be channels-last contiguous, but they won't be channels-last for the purposes of memory format propagation
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.
The right thing would be to expose suggest_memory_format
to python because this is what's used internally to decide whether something is channels-last. But for now probably a TODO will suffice
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda. You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic. [ghstack-poisoned]
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda. You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic. [ghstack-poisoned]
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda. You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/82846
Note: Links to docs will display an error until the docs builds have been completed. ✅ No Failures, 3 PendingAs of commit 20f8d2d: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This might be the root cause of pytorch/torchdynamo#1274 it would be good to land it |
Yup, that's the intention. But also setting up cross-ref testing now.. |
@pytorchbot help |
❌ 🤖 pytorchbot command failed:
Try |
@pytorchbot --help |
PyTorchBot Help
Merge
Revert
Rebase
Label
|
@pytorchbot -h merge |
PyTorchBot Help
Merge
Revert
Rebase
Label
|
@pytorchbot merge --green |
@pytorchbot successfully started a merge job. Check the current status here. |
@pytorchbot merge |
The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot. |
@pytorchbot successfully started a merge job. Check the current status here. |
Hey @eellison. |
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda. You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic. Pull Request resolved: #82846 Approved by: https://github.com/ezyang
Stack from ghstack (oldest at bottom):
The output striding channels-last preservation logic differs between cuda and cpu. For the meta kernel, we can peek at the fake tensor device and use that to determine whether to do cpu or cuda.
You could argue there's a leaking of abstraction here but this seems like a pretty minimal leak and I'm not sure there's a much cleaner way forward for device-specific striding tracing logic.