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
8283e95d
Unverified
Commit
8283e95d
authored
Oct 13, 2022
by
Frank Lee
Committed by
GitHub
Oct 13, 2022
Browse files
[autoparallel] collated all deprecated files (#1700)
* [autoparallel] collated all deprecated files * polish code
parent
e2355d01
Changes
82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
tests/test_auto_parallel/test_tensor_shard/test_node_handler/test_where_handler.py
...test_tensor_shard/test_node_handler/test_where_handler.py
+1
-1
tests/test_auto_parallel/test_tensor_shard/test_solver_with_resnet_v2.py
..._parallel/test_tensor_shard/test_solver_with_resnet_v2.py
+6
-6
No files found.
tests/test_auto_parallel/test_node_handler/test_where_handler
_v2
.py
→
tests/test_auto_parallel/test_
tensor_shard/test_
node_handler/test_where_handler.py
View file @
8283e95d
...
...
@@ -2,7 +2,7 @@ from colossalai.fx.tracer.meta_patch.patched_module import linear
import
torch
import
torch.nn
as
nn
from
colossalai.fx
import
ColoTracer
,
ColoGraphModule
from
colossalai.auto_parallel.solver.
op
_handler.where_handler
_v2
import
WhereHandler
from
colossalai.auto_parallel.solver.
node
_handler.where_handler
import
WhereHandler
from
colossalai.auto_parallel.solver.sharding_strategy
import
OperationData
,
OperationDataType
,
StrategiesVector
from
colossalai.device.device_mesh
import
DeviceMesh
...
...
tests/test_auto_parallel/test_solver_with_resnet_v2.py
→
tests/test_auto_parallel/test_
tensor_shard/test_
solver_with_resnet_v2.py
View file @
8283e95d
...
...
@@ -7,10 +7,10 @@ from colossalai.fx.tracer.tracer import ColoTracer
from
colossalai.auto_parallel.solver.sharding_strategy
import
ShardingStrategy
,
StrategiesVector
from
colossalai.tensor.shape_consistency
import
ShapeConsistencyManager
from
colossalai.device.device_mesh
import
DeviceMesh
from
colossalai.auto_parallel.solver.strategies_constructor
import
StrategiesConstructor
_V2
from
colossalai.auto_parallel.solver.cost_graph
import
CostGraph
_V2
from
colossalai.auto_parallel.solver.strategies_constructor
import
StrategiesConstructor
from
colossalai.auto_parallel.solver.cost_graph
import
CostGraph
from
copy
import
deepcopy
from
colossalai.auto_parallel.solver.solver
import
Solver
_V2
from
colossalai.auto_parallel.solver.solver
import
Solver
from
torchvision.models
import
resnet34
,
resnet50
from
colossalai.auto_parallel.solver.constants
import
*
from
colossalai.auto_parallel.solver.graph_analysis
import
GraphAnalyser
...
...
@@ -60,12 +60,12 @@ def test_cost_graph():
graph_analyser
=
GraphAnalyser
(
gm
)
liveness_list
=
graph_analyser
.
liveness_analysis
()
solver_options
=
SolverOptions
(
fast
=
True
)
strategies_constructor
=
StrategiesConstructor
_V2
(
graph
,
device_mesh
,
solver_options
)
strategies_constructor
=
StrategiesConstructor
(
graph
,
device_mesh
,
solver_options
)
strategies_constructor
.
build_strategies_and_cost
()
cost_graph
=
CostGraph
_V2
(
strategies_constructor
.
leaf_strategies
)
cost_graph
=
CostGraph
(
strategies_constructor
.
leaf_strategies
)
cost_graph
.
simplify_graph
()
solver
=
Solver
_V2
(
gm
.
graph
,
strategies_constructor
,
cost_graph
,
graph_analyser
)
solver
=
Solver
(
gm
.
graph
,
strategies_constructor
,
cost_graph
,
graph_analyser
)
ret
=
solver
.
call_solver_serialized_args
()
print
(
ret
[
0
])
...
...
Prev
1
2
3
4
5
Next
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