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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
torch.is_signed on new uint dtypes raises Unknown ScalarType #125124
Comments
Marking this for triage review since it appears relatively straightforward to add and I'm wondering if we'd accept a PR for this. Also not quite sure about the best module for this. |
@FFFrog do you have PR ready? If not, I'll create one by EOD |
Actually, can do it in 30 min or so, looks like all one needs to do is add more dtypes here Lines 528 to 535 in e30e6d3
|
By defining `CASE_ISSIGNED` macros that just returns `std::numeric_limits<dtype>::is_signed` for the types where it makes sense and explicitly code some types when it does not Remove `default:` case from the switch to avoid regressions like the one reported in #125124
Sorry, my colleague is interested in this problem and working on it, but he is new to pytorch so it will take some time to fix it. |
By defining `CASE_ISSIGNED` macros that just returns `std::numeric_limits<dtype>::is_signed` for the types where it makes sense and explicitly code some types when it does not Remove `default:` case from the switch to avoid regressions like the one reported in #125124
馃悰 Describe the bug
Torch tensors have
.is_signed
property. As of 2.2.0, it works for all integer dtypes, (e.g. torch.uint8.is_signed is False). PyTorch 2.3.0 introduced new unsigned types (which is awesome!), but they do not support is_signed yet.Versions
cc @albanD
The text was updated successfully, but these errors were encountered: