-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
module: testingIssues related to the torch.testing module (not tests)Issues related to the torch.testing module (not tests)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
isclose
gives false positives for large integers.
To Reproduce
>>> a = torch.tensor(140499600015872)
>>> b = torch.tensor(140499600015360)
>>> a == b
tensor(False)
>>> abs(a - b) <= 0
tensor(False)
>>> torch.isclose(a, b, atol=0, rtol=0)
tensor(True)
Expected behavior
a
and b
should not be considered close.
cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411
Metadata
Metadata
Assignees
Labels
module: testingIssues related to the torch.testing module (not tests)Issues related to the torch.testing module (not tests)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module