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
6878e422
Unverified
Commit
6878e422
authored
Oct 11, 2022
by
YuliangLiu0306
Committed by
GitHub
Oct 11, 2022
Browse files
[hotfix] solver bug caused by dict type comm cost (#1686)
parent
3dd69944
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
1 deletion
+3
-1
colossalai/auto_parallel/solver/constants.py
colossalai/auto_parallel/solver/constants.py
+0
-1
colossalai/auto_parallel/solver/op_handler/reshape_handler.py
...ssalai/auto_parallel/solver/op_handler/reshape_handler.py
+1
-0
colossalai/auto_parallel/solver/solver.py
colossalai/auto_parallel/solver/solver.py
+2
-0
No files found.
colossalai/auto_parallel/solver/constants.py
View file @
6878e422
...
...
@@ -16,7 +16,6 @@ ELEMENTWISE_FUNC_OP = [
torch
.
multiply
,
torch
.
nn
.
functional
.
relu
,
torch
.
nn
.
functional
.
dropout
,
torch
.
flatten
,
# softmax should not be here
torch
.
nn
.
functional
.
softmax
]
...
...
colossalai/auto_parallel/solver/op_handler/reshape_handler.py
View file @
6878e422
...
...
@@ -69,6 +69,7 @@ class ReshapeHandler(OperatorHandler):
shape_consistency_manager
=
ShapeConsistencyManager
()
_
,
_
,
communication_cost
=
shape_consistency_manager
.
shape_consistency
(
input_sharding_spec
,
replicate_input_sharding_spec
)
communication_cost
=
communication_cost
[
"total"
]
# generate resharding cost
resharding_costs
=
self
.
_generate_resharding_costs
([
input_sharding_spec
])
...
...
colossalai/auto_parallel/solver/solver.py
View file @
6878e422
...
...
@@ -319,6 +319,8 @@ class Solver:
obj
=
0
for
i
in
range
(
node_nums
):
assert
len
(
s
[
i
])
==
len
(
c
[
i
])
assert
len
(
s
[
i
])
==
len
(
d
[
i
])
obj
+=
lpDot
(
s
[
i
],
c
[
i
])
+
lpDot
(
s
[
i
],
d
[
i
])
#############################################
...
...
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