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
49832b23
Unverified
Commit
49832b23
authored
Jun 06, 2022
by
Jiarui Fang
Committed by
GitHub
Jun 06, 2022
Browse files
[refactory] add nn.parallel module (#1068)
parent
6754f1b7
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
tests/test_tensor/test_zero_optim.py
tests/test_tensor/test_zero_optim.py
+2
-2
tests/test_utils/test_pipelinable.py
tests/test_utils/test_pipelinable.py
+0
-5
No files found.
tests/test_tensor/test_zero_optim.py
View file @
49832b23
...
@@ -6,11 +6,11 @@ from colossalai.context.parallel_mode import ParallelMode
...
@@ -6,11 +6,11 @@ from colossalai.context.parallel_mode import ParallelMode
from
colossalai.testing
import
rerun_if_address_is_in_use
from
colossalai.testing
import
rerun_if_address_is_in_use
from
colossalai.utils.cuda
import
get_current_device
from
colossalai.utils.cuda
import
get_current_device
from
colossalai.utils
import
free_port
from
colossalai.utils
import
free_port
from
colossalai.utils
import
ColoInitContext
from
colossalai.utils
.model.colo_init_context
import
ColoInitContext
from
colossalai.tensor
import
ChunkManager
from
colossalai.tensor
import
ChunkManager
from
colossalai.core
import
global_context
as
gpc
from
colossalai.core
import
global_context
as
gpc
from
functools
import
partial
from
functools
import
partial
from
_utils
import
tensor_equal
,
tensor_shard_equal
,
set_seed
from
_utils
import
tensor_equal
,
set_seed
from
tests.components_to_test.registry
import
non_distributed_component_funcs
from
tests.components_to_test.registry
import
non_distributed_component_funcs
from
torch.nn.parallel
import
DistributedDataParallel
as
DDP
from
torch.nn.parallel
import
DistributedDataParallel
as
DDP
from
colossalai.nn.parallel
import
ColoDDPV2
from
colossalai.nn.parallel
import
ColoDDPV2
...
...
tests/test_utils/test_pipelinable.py
View file @
49832b23
import
os.path
as
osp
import
pytest
import
torch
import
torch
import
torch.multiprocessing
as
mp
import
torch.multiprocessing
as
mp
from
colossalai.utils.model.pipelinable
import
PipelinableContext
from
colossalai.utils.model.pipelinable
import
PipelinableContext
from
functools
import
partial
from
colossalai.utils
import
free_port
from
colossalai.testing
import
rerun_on_exception
from
colossalai.testing
import
rerun_on_exception
NUM_CHUNKS
=
1
NUM_CHUNKS
=
1
...
...
Prev
1
2
Next
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