未验证 提交 1da6f2e3 编写于 作者: W wanghuancoder 提交者: GitHub

adam batxx_pow not in cpu (#48626)

上级 5789ac5a
......@@ -728,8 +728,10 @@ class Optimizer:
if device is None:
device = self._get_device_for_param(param.name)
if in_dygraph_mode() and (
device == 'cpu' or isinstance(device, core.CPUPlace)
if (
in_dygraph_mode()
and (device == 'cpu' or isinstance(device, core.CPUPlace))
and (not core.is_compiled_with_xpu())
):
_C_ops.full_(
var,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册