未验证 提交 2755ae6a 编写于 作者: A Aurelius84 提交者: GitHub

[Dy2St]Remove usless cast operation to speed up FP16 training (#46851)

上级 f94edc3b
...@@ -598,16 +598,6 @@ class PartialProgramLayer: ...@@ -598,16 +598,6 @@ class PartialProgramLayer:
== paddle.float16): == paddle.float16):
in_vars[i] = var.astype('float16') in_vars[i] = var.astype('float16')
in_vars[i].name = name in_vars[i].name = name
if (self.forward_program.global_block().has_var(name)
and self.forward_program.global_block().var(name).dtype
== paddle.float16):
in_vars[i] = var.astype('float16')
in_vars[i].name = name
if (self.backward_program.global_block().has_var(name)
and self.backward_program.global_block().var(name).dtype
== paddle.float16):
in_vars[i] = var.astype('float16')
in_vars[i].name = name
@property @property
def program(self): def program(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册