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
This commit is contained in:
Yuanyuan Chen
2025-10-05 07:38:25 +00:00
committed by PyTorch MergeBot
parent 3c5ca685d6
commit 321e602692
97 changed files with 182 additions and 255 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")