Skip to content

Commit

Permalink
test(AutoParallel): test model add auto_parallel config
Browse files Browse the repository at this point in the history
  • Loading branch information
wyg1997 committed Aug 15, 2022
1 parent 755d3e6 commit 9dbb458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/oneflow/test/graph/test_alexnet_auto_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ class AlexNetEvalGraph(flow.nn.Graph):
def __init__(self):
super().__init__()
self.alexnet = alexnet_module
self.config.enable_auto_parallel(True)
self.config.enable_auto_parallel_prune_parallel_cast_ops(True)
self.config.enable_auto_parallel_mainstem_algo(True)
self.config.enable_auto_parallel_sbp_collector(True)

def build(self, image):
with flow.no_grad():
Expand Down

0 comments on commit 9dbb458

Please sign in to comment.