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
8aa4619f
Commit
8aa4619f
authored
Mar 22, 2021
by
Jared Casper
Browse files
Cherry-pick fix from development repo.
parent
1b3dfa2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
megatron/mpu/layers.py
megatron/mpu/layers.py
+1
-1
No files found.
megatron/mpu/layers.py
View file @
8aa4619f
...
@@ -109,7 +109,7 @@ def _initialize_affine_weight_cpu(weight, output_size, input_size,
...
@@ -109,7 +109,7 @@ def _initialize_affine_weight_cpu(weight, output_size, input_size,
per_partition_per_stride_size
=
divide
(
per_partition_size
,
stride
)
per_partition_per_stride_size
=
divide
(
per_partition_size
,
stride
)
weight_list
=
torch
.
split
(
master_weight
,
per_partition_per_stride_size
,
weight_list
=
torch
.
split
(
master_weight
,
per_partition_per_stride_size
,
dim
=
partition_dim
)
dim
=
partition_dim
)
rank
=
get_model_parallel_rank
()
rank
=
get_
tensor_
model_parallel_rank
()
world_size
=
get_tensor_model_parallel_world_size
()
world_size
=
get_tensor_model_parallel_world_size
()
my_weight_list
=
weight_list
[
rank
::
world_size
]
my_weight_list
=
weight_list
[
rank
::
world_size
]
...
...
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