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

Add missing type uint16, uint32, and uint64 to TensorHash in LTC. #125972

Closed
wants to merge 3 commits into from

Conversation

vanbasten23
Copy link
Contributor

@vanbasten23 vanbasten23 commented May 10, 2024

If I do:

xla_device = xm.xla_device()
xla_tensor_0 = torch.tensor(42, dtype=torch.uint32).to(xla_device)

I got the error:

RuntimeError: false INTERNAL ASSERT FAILED at "/ansible/pytorch/torch/csrc/lazy/core/hash.h":139, please report a bug to PyTorch. Unsupported scalar type:UInt16

This PR intends to fix this issue.
The data type can be found in pytorch/c10/core/ScalarType.h.

Copy link

pytorch-bot bot commented May 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125972

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 31cff15 with merge base ee804d2 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@vanbasten23
Copy link
Contributor Author

vanbasten23 commented May 13, 2024

hey @JackCaoG , could you approve the CI? I want to find out where I can add a test for my change. I've checked myforks/pytorch/test/cpp/lazy/test_misc.cpp but it doesn't seem to trigger the function TensorHash. Thanks!

@vanbasten23 vanbasten23 requested a review from JackCaoG May 13, 2024 23:20
@vanbasten23
Copy link
Contributor Author

Hi @JackCaoG , could you take another look at the PR? I was searching for the place to add a test but couldn't find any in Pytorch. Since pytorch CI runs pytorch/xla tests and one of the pytorch/xla tests exercise the case, I think we can leverage that. Thanks!

@JackCaoG
Copy link
Collaborator

Give me another ping when CI is green

@vanbasten23
Copy link
Contributor Author

hey @JackCaoG , the CI is green.
Thanks for the review!

@JackCaoG
Copy link
Collaborator

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 15, 2024
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@JackCaoG
Copy link
Collaborator

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label May 15, 2024
@JackCaoG
Copy link
Collaborator

@pytorchbot merge

@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

ZelboK pushed a commit to ZelboK/pytorch that referenced this pull request May 19, 2024
…torch#125972)

If I do:

```
xla_device = xm.xla_device()
xla_tensor_0 = torch.tensor(42, dtype=torch.uint32).to(xla_device)
```

I got the error:

```
RuntimeError: false INTERNAL ASSERT FAILED at "/ansible/pytorch/torch/csrc/lazy/core/hash.h":139, please report a bug to PyTorch. Unsupported scalar type:UInt16
```

This PR intends to fix this issue.
The data type can be found in pytorch/c10/core/ScalarType.h.
Pull Request resolved: pytorch#125972
Approved by: https://github.com/JackCaoG
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 Merged open source topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants