[BE]: Apply ruff PERF fixes to torch (#104917)

Applies automated ruff fixes in the PERF modules and enables all automatic ones. I also updated ruff which applied some additional fixes.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/104917
Approved by: https://github.com/ezyang, https://github.com/albanD
This commit is contained in:
Aaron Gokaslan
2023-07-11 20:45:18 +00:00
committed by PyTorch MergeBot
parent c9a806be28
commit 2f95a3d0fc
42 changed files with 89 additions and 147 deletions

View File

@ -406,7 +406,7 @@ class TestVmapAPI(TestCase):
with self.assertRaisesRegex(ValueError, msg):
vmap(torch.mul, [0, 0])(x, y)
with self.assertRaisesRegex(ValueError, msg):
vmap(torch.mul, set({0, 0}))(x, y)
vmap(torch.mul, set({0}))(x, y)
with self.assertRaisesRegex(ValueError, msg):
vmap(torch.mul, 'lol')(x, y)
with self.assertRaisesRegex(ValueError, msg):