未验证 提交 0fb15d9f 编写于 作者: R Roc 提交者: GitHub

fix optimizer.py (#34431)

上级 995195f9
......@@ -4637,7 +4637,7 @@ class PipelineOptimizer(object):
elif self._is_weight_decay_op(op) and op.type == 'scale':
# set AdamW decay_coeff to device:all
op._set_attr(self._op_device_key, f"{self._device}:all")
elif op.type == "alloc_float_status":
elif op.type == "alloc_float_status" or op.type == "clear_float_status":
op._set_attr(self._op_device_key, f"{self._device}:all")
else:
other_known_ops = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册