未验证 提交 202c06a2 编写于 作者: K kangguangli 提交者: GitHub

[BugFix] fix raw_program_optimizer not apply when using amp (#51865)

* fix raw_program_optimizer not apply when using amp

* fix CI
上级 59841444
......@@ -68,8 +68,6 @@ class RawProgramOptimizer(MetaOptimizerBase):
return False
if self.user_defined_strategy.sharding:
return False
if self.user_defined_strategy.amp:
return False
if self.without_graph_optimization:
return True
......
......@@ -184,7 +184,7 @@ class TestFleetAMPOptimizer(TestFleetMetaOptimizer):
applied_meta_list = fleet._get_applied_meta_list()
applied_graph_list = fleet._get_applied_graph_list()
print(applied_meta_list, applied_graph_list)
self.assertEqual(len(applied_meta_list), 3)
self.assertEqual(len(applied_meta_list), 4)
ops = [op.type for op in avg_cost.block.ops]
outs = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册