mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
f1d882212a
commit
e925dfcc6b
@ -129,7 +129,7 @@ class TestSegmentReductions(TestCase):
|
||||
|
||||
for reduction in reductions:
|
||||
for initial in [0, None]:
|
||||
check_backward = True if initial is not None else False
|
||||
check_backward = initial is not None
|
||||
initial_value = initial
|
||||
default_value = get_default_value(initial_value, reduction)
|
||||
if reduction == "max":
|
||||
@ -186,7 +186,7 @@ class TestSegmentReductions(TestCase):
|
||||
|
||||
for reduction in reductions:
|
||||
for initial in [0, None]:
|
||||
check_backward = True if initial is not None else False
|
||||
check_backward = initial is not None
|
||||
initial_value = initial
|
||||
default_value = get_default_value(initial_value, reduction)
|
||||
if reduction == "max":
|
||||
@ -244,7 +244,7 @@ class TestSegmentReductions(TestCase):
|
||||
|
||||
for reduction in reductions:
|
||||
for initial in [0, None]:
|
||||
check_backward = True if initial is not None else False
|
||||
check_backward = initial is not None
|
||||
initial_value = initial
|
||||
default_value = get_default_value(initial_value, reduction)
|
||||
if reduction == "max":
|
||||
|
Reference in New Issue
Block a user