Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
920fe315
"examples/vscode:/vscode.git/clone" did not exist on "d7f8db8e21fe63d4279afafadc6ed4663952cba8"
Unverified
Commit
920fe315
authored
Apr 14, 2022
by
Frank Lee
Committed by
GitHub
Apr 14, 2022
Browse files
[compatibility] used backward-compatible API for global process group (#758)
parent
4ea49cb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
colossalai/context/parallel_context.py
colossalai/context/parallel_context.py
+1
-1
No files found.
colossalai/context/parallel_context.py
View file @
920fe315
...
...
@@ -374,7 +374,7 @@ class ParallelContext(metaclass=SingletonMeta):
# None will give the default global process group for pytorch dist operations
ranks
=
list
(
range
(
world_size
))
cpu_group
=
dist
.
new_group
(
ranks
,
backend
=
'gloo'
)
if
dist
.
get_backend
()
!=
'gloo'
else
None
self
.
_register_dist
(
rank
,
world_size
,
None
,
cpu_group
,
ranks
,
ParallelMode
.
GLOBAL
)
self
.
_register_dist
(
rank
,
world_size
,
dist
.
GroupMember
.
WORLD
,
cpu_group
,
ranks
,
ParallelMode
.
GLOBAL
)
self
.
add_global_rank
(
ParallelMode
.
GLOBAL
,
rank
)
def
_register_dist
(
self
,
local_rank
,
world_size
,
process_group
,
cpu_group
,
ranks_in_group
,
mode
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment