diff --git a/python/paddle/distributed/auto_parallel/completion.py b/python/paddle/distributed/auto_parallel/completion.py index 465c450c0b0764edbaa0e4f42e606ada4eb90d1b..86632d81098c93531e66239079aa3e7f4c78b46f 100644 --- a/python/paddle/distributed/auto_parallel/completion.py +++ b/python/paddle/distributed/auto_parallel/completion.py @@ -1307,7 +1307,7 @@ class Completer: if serial_main_program is None: serial_main_program = self._dist_context.serial_main_program else: - self._dist_context.serial_main_program = serial_main_program + self._dist_context._serial_main_program = serial_main_program import time diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt b/python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt index 381461130ed5c749f9549f0a51b6765dddabd9dc..8c8a6823105d36270620931a599fa77dbb02d717 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt @@ -32,4 +32,5 @@ if(WITH_DISTRIBUTE AND WITH_GPU) py_test_modules(test_comm_cost MODULES test_comm_cost ENVS ${dist_ENVS}) py_test_modules(test_comp_cost MODULES test_comp_cost ENVS ${dist_ENVS}) py_test_modules(test_dist_context MODULES test_dist_context ENVS ${dist_ENVS}) + py_test_modules(test_prim_dist_op MODULES test_prim_dist_op ENVS ${dist_ENVS}) endif()