def reset_test_context(): context.reset_auto_parallel_context() auto_parallel_context().set_enable_all_reduce_fusion(enable_all_reduce_fusion=True) context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False) reset_cost_model_context() reset_algo_parameters() _reset_op_id()
def setup_module(): auto_parallel_context().set_enable_all_reduce_fusion(enable_all_reduce_fusion=True) context.set_context(mode=context.GRAPH_MODE, device_target="Ascend", save_graphs=False) GlobalComm.INITED = True reset_cost_model_context() reset_algo_parameters() _reset_op_id()
def teardown_module(): context.reset_auto_parallel_context() reset_cost_model_context() reset_algo_parameters() _reset_op_id()
def teardown_module(): context.reset_auto_parallel_context() GlobalComm.INITED = False reset_cost_model_context() reset_algo_parameters() _reset_op_id()