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 cuda/cpu check on NoneType #88854
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88854
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7192859: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D41203955 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D41203955 |
Summary: Pull Request resolved: pytorch#88854 Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 fbshipit-source-id: c4618a41b1d83c7e7c9263402edc7f4c3643e2b7
7ceaac3
to
5096aa8
Compare
Summary: Pull Request resolved: pytorch#88854 Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 fbshipit-source-id: f8d14b3e241a149b35266b134ad622b29379a6d1
5096aa8
to
18d0333
Compare
This pull request was exported from Phabricator. Differential Revision: D41203955 |
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 pull request was exported from Phabricator. Differential Revision: D41203955 |
Summary: Pull Request resolved: pytorch#88854 Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 fbshipit-source-id: f472161a5e3389d03035c6461f7cee102018d5fe
18d0333
to
1459c0c
Compare
Summary: Pull Request resolved: pytorch#88854 Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Reviewed By: drisspg Differential Revision: D41203955 fbshipit-source-id: a6b1b5d4aec0d5d2efc0483cefd07b431b83473e
1459c0c
to
adedf1d
Compare
This pull request was exported from Phabricator. Differential Revision: D41203955 |
Summary: Pull Request resolved: pytorch#88854 Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Reviewed By: drisspg Differential Revision: D41203955 fbshipit-source-id: b44de88b8f7f856706ee76a4a5702f392b07075b
@@ -1114,7 +1114,7 @@ def forward(self, query: Tensor, key: Tensor, value: Tensor, key_padding_mask: O | |||
# generator expressions. | |||
if torch.overrides.has_torch_function(tensor_args): | |||
why_not_fast_path = "some Tensor argument has_torch_function" | |||
elif not all([(x.is_cuda or 'cpu' in str(x.device)) for x in tensor_args]): | |||
elif not all([(x is None or x.is_cuda or 'cpu' in str(x.device)) for x in tensor_args]): |
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.
pre-existing condition, but proper check is x.device.type=='cpu'
adedf1d
to
7192859
Compare
This pull request was exported from Phabricator. Differential Revision: D41203955 |
@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 |
Also addresses #88669 |
Summary: Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 Pull Request resolved: pytorch#88854 Approved by: https://github.com/drisspg, https://github.com/ngimel
Summary: Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 Pull Request resolved: pytorch#88854 Approved by: https://github.com/drisspg, https://github.com/ngimel
Summary: Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 Pull Request resolved: #88854 Approved by: https://github.com/drisspg, https://github.com/ngimel Co-authored-by: Michael Gschwind <mikekg@meta.com>
Summary: Fix cuda/cpu check on NoneType Test Plan: sabdcastle/ github CI/CD Differential Revision: D41203955 Pull Request resolved: pytorch#88854 Approved by: https://github.com/drisspg, https://github.com/ngimel
Summary: Fix cuda/cpu check on NoneType
Test Plan: sabdcastle/ github CI/CD
Differential Revision: D41203955