Updates tests for integer division deprecation#38621
Updates tests for integer division deprecation#38621
Conversation
💊 CI failures summary and remediationsAs of commit b7d065c (more details on the Dr. CI page):
🕵️ 3 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
facebook-github-bot
left a comment
There was a problem hiding this comment.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| self.assertRaises(RuntimeError, lambda: op(s1, d2.view(d2.numel())[0].item())) | ||
|
|
||
| def _run_all_tests_for_sparse_op(self, op_name, device): | ||
| def _run_all_tests_for_sparse_op(self, op_name, device, dtypes=None): |
There was a problem hiding this comment.
nit: no default arguments in tests.
| self.assertEqual(2 - torch.tensor(3), 2 - torch.tensor(3).to(devices[1])) # __rsub__ | ||
| self.assertEqual(2 * torch.tensor(3), 2 * torch.tensor(3).to(devices[1])) # __rmul__ | ||
| self.assertEqual(2 / torch.tensor(3), 2 / torch.tensor(3).to(devices[1])) # __rtruediv__ | ||
| self.assertEqual(2 / torch.tensor(3.), 2 / torch.tensor(3.).to(devices[1])) # __rtruediv__ |
There was a problem hiding this comment.
for these that you changed from ints to floats, can you just check that there are places here that test floor_div on ints.
There was a problem hiding this comment.
Yep (see the line just below this one, for example).
facebook-github-bot
left a comment
There was a problem hiding this comment.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
I see. That issue was probably concealed by other ROCm build failures. Would you submit a PR updating the types to not include bfloat16 on ROCm? |
|
@rohithkrn is working on a PR. |
|
Thank you, @jeffdaily! Sorry for the inconvenience. |
Summary: This PR fixes the tolerance values for some of the bfloat16 div tests that were enabled on ROCm with incorrect tolerance values in the PR #38621 Also disabled(to unblock CI) `test_addcdiv*` for which the error is large when absolute values in the tensor are higher. This will have to be investigated further. ezyang jeffdaily sunway513 Pull Request resolved: #38823 Differential Revision: D21686290 Pulled By: ezyang fbshipit-source-id: 85472680e1886bdc7c227ed2656e0b4fd5328e46
Summary: Updates our tests in preparation of integer division using torch.div and torch.addcdiv throwing a runtime error by avoiding integer division using torch.div. This creates a brief period where integer division using torch.div is untested, but that should be OK (since it will soon throw a runtime error). These callsites were identified using pytorch#36897. Pull Request resolved: pytorch#38621 Differential Revision: D21612823 Pulled By: mruberry fbshipit-source-id: 749c03a69feae02590b4395335163d9bf047e162
…8823) Summary: This PR fixes the tolerance values for some of the bfloat16 div tests that were enabled on ROCm with incorrect tolerance values in the PR pytorch#38621 Also disabled(to unblock CI) `test_addcdiv*` for which the error is large when absolute values in the tensor are higher. This will have to be investigated further. ezyang jeffdaily sunway513 Pull Request resolved: pytorch#38823 Differential Revision: D21686290 Pulled By: ezyang fbshipit-source-id: 85472680e1886bdc7c227ed2656e0b4fd5328e46
Updates our tests in preparation of integer division using torch.div and torch.addcdiv throwing a runtime error by avoiding integer division using torch.div. This creates a brief period where integer division using torch.div is untested, but that should be OK (since it will soon throw a runtime error).
These callsites were identified using #36897.