[BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149257
Approved by: https://github.com/jansel
This commit is contained in:
Aaron Gokaslan
2025-03-18 00:46:07 +00:00
committed by PyTorch MergeBot
parent 811f587d86
commit a0ac63cbd9
23 changed files with 48 additions and 81 deletions

View File

@ -91,9 +91,7 @@ def tunableop_matmul(device, dtype):
def get_tunableop_validators():
assert len(torch.cuda.tunable.get_validators()) > 0
validators = {}
for key, value in torch.cuda.tunable.get_validators():
validators[key] = value
validators = dict(torch.cuda.tunable.get_validators())
return validators
class TestLinalg(TestCase):