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
Megatron-LM
Commits
c0329d8d
Commit
c0329d8d
authored
Oct 07, 2022
by
shanmugamr
Browse files
Code covearage
parents
2fd9ea1a
94dd94e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
10 deletions
+1
-10
.coverage
.coverage
+0
-0
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
tests/test_parallel_state.py
tests/test_parallel_state.py
+0
-9
No files found.
.coverage
0 → 100644
View file @
c0329d8d
File added
.gitlab-ci.yml
View file @
c0329d8d
...
...
@@ -2,7 +2,7 @@ image: gitlab-master.nvidia.com/dl/dgx/pytorch:21.12-py3-devel
test
:
tags
:
-
docker
-
docker
_gpu_enabled
script
:
-
nvidia-smi
-
torchrun --nproc_per_node=2 -m pytest --cov-report=term --cov-report=html --cov=megatron/core tests/'
...
...
tests/test_parallel_state.py
View file @
c0329d8d
...
...
@@ -124,22 +124,13 @@ def test_get_tensor_model_parallel_src_rank():
assert
(
ps
.
get_tensor_model_parallel_src_rank
()
==
((
rank
//
world_size
)
*
world_size
))
ps
.
destroy_model_parallel
()
def
test_global_memory_buffer
():
ps
.
_GLOBAL_MEMORY_BUFFER
=
None
ps
.
_set_global_memory_buffer
()
assert
(
ps
.
get_global_memory_buffer
()
is
not
None
)
"""
def test_get_virtual_pipeline_model_parallel_world_size():
initialize_model_parallel(pipeline_model_parallel_size=world_size)
ps.set_virtual_pipeline_model_parallel_rank(world_size)
assert(ps.get_virtual_pipeline_model_parallel_world_size() == world_size)
ps.destroy_model_parallel()
def test_is_rank_in_embedding_group():
assert(ps.is_rank_in_embedding_group(ignore_virtual=True) == (rank in ps._EMBEDDING_GLOBAL_RANKS))
if rank in ps._EMBEDDING_GLOBAL_RANKS:
...
...
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