From 646eb4f06f967f575e946f2832a846b4c3d896b4 Mon Sep 17 00:00:00 2001 From: Jiangxinz Date: Tue, 29 Jun 2021 10:20:50 +0800 Subject: [PATCH] fix undef var (#33696) --- .../fleet/meta_optimizers/ascend/ascend_parser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/paddle/distributed/fleet/meta_optimizers/ascend/ascend_parser.py b/python/paddle/distributed/fleet/meta_optimizers/ascend/ascend_parser.py index 5f2b6df493..8f1a4de86d 100644 --- a/python/paddle/distributed/fleet/meta_optimizers/ascend/ascend_parser.py +++ b/python/paddle/distributed/fleet/meta_optimizers/ascend/ascend_parser.py @@ -342,7 +342,7 @@ class DotPowParser(AscendParserBase): y = self._get_ge_input(self.op.input_arg_names[1]) pow = core.GEOperatorFactory.create_operator( "dotpow" + self._accumulated_op_id(), - "Pow").set_input("x1", x1).set_input("x2", y) + "Pow").set_input("x1", x).set_input("x2", y) return [pow], [[0]] @@ -918,15 +918,15 @@ class ScatterParser(AscendParserBase): scatter_value = core.GEOperatorFactory.create_operator( "scatter" + self._accumulated_op_id(), "TensorScatterAdd").set_input( - "x", x_var).set_input("indices", index_var).set_input( - "updates", updatesi_var) + "x", x).set_input("indices", index).set_input("updates", + updates) else: scatter_value = core.GEOperatorFactory.create_operator( "scatter" + self._accumulated_op_id(), "TensorScatterUpdate").set_input( - "x", x_var).set_input("indices", index_var).set_input( - "updates", updates_var) - return [x_var, index_var, updates_var, scatter_value], [[-1]] + "x", x).set_input("indices", index).set_input("updates", + updates) + return [x, index, updates, scatter_value], [[-1]] class CastParser(AscendParserBase): -- GitLab