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 cuda/cpu check on NoneType #88854

Closed
wants to merge 1 commit into from

Conversation

mikekgfb
Copy link
Contributor

Summary: Fix cuda/cpu check on NoneType

Test Plan: sabdcastle/ github CI/CD

Differential Revision: D41203955

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 11, 2022

🔗 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 Failures

As of commit 7192859:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41203955

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41203955

mikekgfb added a commit to mikekgfb/pytorch that referenced this pull request Nov 11, 2022
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
mikekgfb added a commit to mikekgfb/pytorch that referenced this pull request Nov 11, 2022
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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41203955

@drisspg drisspg self-requested a review November 11, 2022 03:09
Copy link
Contributor

@drisspg drisspg left a comment

Choose a reason for hiding this comment

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

👍

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41203955

mikekgfb added a commit to mikekgfb/pytorch that referenced this pull request Nov 11, 2022
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
mikekgfb added a commit to mikekgfb/pytorch that referenced this pull request Nov 11, 2022
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
@facebook-github-bot
Copy link
Contributor

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]):
Copy link
Collaborator

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'

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41203955

@mikekgfb
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 11, 2022
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@mikekgfb mikekgfb added this to the 1.13.1 milestone Dec 2, 2022
@cpuhrsch
Copy link
Contributor

cpuhrsch commented Dec 2, 2022

Also addresses #88669

weiwangmeta pushed a commit to weiwangmeta/pytorch that referenced this pull request Dec 2, 2022
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
weiwangmeta pushed a commit to weiwangmeta/pytorch that referenced this pull request Dec 6, 2022
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
atalman pushed a commit that referenced this pull request Dec 6, 2022
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>
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants