[compatibility] support torch 2.2 (#5875)

* Support Pytorch 2.2.2

* keep build_on_pr file and update .compatibility
pull/5912/head
Guangyao Zhang 2024-07-04 10:53:09 +08:00 committed by Hongxin Liu
parent d8bf7e09a2
commit 2e28c793ce
2 changed files with 2 additions and 1 deletions

View File

@ -1 +1,2 @@
2.1.0-12.1.0
2.2.2-12.1.0

View File

@ -473,7 +473,7 @@ class LayoutConverter(metaclass=SingletonMeta):
for process_group in used_process_groups:
try:
dist.get_rank(process_group)
except RuntimeError as e:
except (ValueError, RuntimeError) as e:
# If the group is not registered, it means it has been deleted
if str(e) == (
f"Group {process_group} is not registered, please create group with torch.distributed.new_group API"