mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[2/N] More ruff SIM fixes (#165031)
This is follow-up of #164695 to apply ruff SIM rules to more files. Most changes are about simplifying dict.get because None is already the default value. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165031 Approved by: https://github.com/mlazos
This commit is contained in:
committed by
PyTorch MergeBot
parent
ffc9559d9f
commit
38095fbd13
@ -5067,7 +5067,7 @@ def _is_safe_to_split() -> bool:
|
||||
users must be aware that a pg is only splittable after the first collective is
|
||||
issued.
|
||||
"""
|
||||
return False if _get_default_group().bound_device_id is None else True
|
||||
return _get_default_group().bound_device_id is not None
|
||||
|
||||
|
||||
@_time_logger
|
||||
|
Reference in New Issue
Block a user