Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
DeepEP
Commits
cd371d31
Commit
cd371d31
authored
Jun 18, 2025
by
Shangyan Zhou
Browse files
Move import.
parent
bf4a4a21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/utils.py
tests/utils.py
+1
-1
No files found.
tests/utils.py
View file @
cd371d31
...
@@ -4,6 +4,7 @@ import numpy as np
...
@@ -4,6 +4,7 @@ import numpy as np
import
torch
import
torch
import
torch.distributed
as
dist
import
torch.distributed
as
dist
from
typing
import
Optional
from
typing
import
Optional
import
inspect
def
init_dist
(
local_rank
:
int
,
num_local_ranks
:
int
):
def
init_dist
(
local_rank
:
int
,
num_local_ranks
:
int
):
...
@@ -14,7 +15,6 @@ def init_dist(local_rank: int, num_local_ranks: int):
...
@@ -14,7 +15,6 @@ def init_dist(local_rank: int, num_local_ranks: int):
node_rank
=
int
(
os
.
getenv
(
'RANK'
,
0
))
node_rank
=
int
(
os
.
getenv
(
'RANK'
,
0
))
assert
(
num_local_ranks
<
8
and
num_nodes
==
1
)
or
num_local_ranks
==
8
assert
(
num_local_ranks
<
8
and
num_nodes
==
1
)
or
num_local_ranks
==
8
import
inspect
sig
=
inspect
.
signature
(
dist
.
init_process_group
)
sig
=
inspect
.
signature
(
dist
.
init_process_group
)
params
=
{
params
=
{
'backend'
:
'nccl'
,
'backend'
:
'nccl'
,
...
...
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