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

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

上级 4b472656
......@@ -599,16 +599,6 @@ class PartialProgramLayer:
== paddle.float16):
in_vars[i] = var.astype('float16')
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
def program(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册