Enable all SIM rules except disabled ones (#164645)

`SIM` rules are useful for simplifying boolean expressions and enhances code readability.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164645
Approved by: https://github.com/ezyang, https://github.com/mlazos
This commit is contained in:
Yuanyuan Chen
2025-10-17 07:27:06 +00:00
committed by PyTorch MergeBot
parent f1d882212a
commit e925dfcc6b
54 changed files with 98 additions and 134 deletions

View File

@ -3522,7 +3522,7 @@ tensor(..., device='meta', size=(1,), requires_grad=True)""")
nn.RNN(10, 20, batch_first=True)
]
# ROCm RNN does not issue warning about single contig chunk of memory, so don't assert it
first_warn = False if torch.version.hip else True
first_warn = not torch.version.hip
for rnn in rnns:
rnn.cuda()
input = torch.randn(5, 4, 10, requires_grad=True, device="cuda")