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
5d9a0ae7
Unverified
Commit
5d9a0ae7
authored
Jan 17, 2024
by
Zhongkai Zhao
Committed by
GitHub
Jan 17, 2024
Browse files
[hotfix] Fix ShardFormer test execution path when using sequence parallelism (#5230)
parent
46e09165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_shardformer/test_model/_utils.py
tests/test_shardformer/test_model/_utils.py
+1
-1
No files found.
tests/test_shardformer/test_model/_utils.py
View file @
5d9a0ae7
...
...
@@ -154,7 +154,7 @@ def run_forward_backward_with_hybrid_plugin(
data
=
data_gen_fn
()
if
booster
.
plugin
.
enable_sequence_parallelism
and
booster
.
plugin
.
tp_size
!=
0
:
if
booster
.
plugin
.
shard_config
.
enable_sequence_parallelism
and
booster
.
plugin
.
tp_size
!=
0
:
seq_len
=
data
[
"input_ids"
].
shape
[
-
1
]
lcm
=
booster
.
plugin
.
tp_size
*
seq_len
//
math
.
gcd
(
booster
.
plugin
.
tp_size
,
seq_len
)
times
=
lcm
//
seq_len
...
...
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