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
b7d0990c
Unverified
Commit
b7d0990c
authored
Dec 30, 2022
by
Super Daniel
Committed by
GitHub
Dec 30, 2022
Browse files
[autoparallel] fix construct meta info. (#2245)
parent
89542ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
colossalai/auto_parallel/passes/runtime_apply_pass.py
colossalai/auto_parallel/passes/runtime_apply_pass.py
+4
-3
No files found.
colossalai/auto_parallel/passes/runtime_apply_pass.py
View file @
b7d0990c
...
...
@@ -62,7 +62,8 @@ def construct_meta_info(node: Node, user_node: Node) -> MetaInfo:
return
new_shape
meta_info
=
MetaInfo
()
origin_sharding_spec
,
target_sharding_spec
=
node
.
sharding_spec
,
user_node
.
sharding_spec
origin_sharding_spec
,
target_sharding_spec
=
node
.
sharding_spec
,
user_node
.
best_strategy
.
get_sharding_spec_by_name
(
str
(
node
.
name
))
_
,
comm_action_sequence
,
total_cost
=
shape_consistency_manager
.
shape_consistency
(
origin_sharding_spec
,
target_sharding_spec
)
...
...
@@ -174,8 +175,8 @@ def _shape_consistency_apply(gm: torch.fx.GraphModule):
runtime_apply
,
args
=
(
node
,
origin_dict_node
,
input_dict_node
,
node_to_index_dict
[
node
],
user_node_index
))
#
meta_info = construct_meta_info(node, user_node)
#
setattr(shape_consistency_node, 'best_metainfo', meta_info)
meta_info
=
construct_meta_info
(
node
,
user_node
)
setattr
(
shape_consistency_node
,
'best_metainfo'
,
meta_info
)
new_args
=
list
(
user_node
.
args
)
new_kwargs
=
dict
(
user_node
.
kwargs
)
...
...
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