diff --git a/mindspore/ops/operations/other_ops.py b/mindspore/ops/operations/other_ops.py index 4ac5b8b058a89939dfe9943a5b77a47be5897efa..e2db34ca8861ac7fdb6390154d8db8e946c73242 100644 --- a/mindspore/ops/operations/other_ops.py +++ b/mindspore/ops/operations/other_ops.py @@ -532,6 +532,7 @@ class Push(PrimitiveWithInfer): def __init__(self, optim_type='ApplyMomentum', only_shape_indices=None): """init Push""" self.add_prim_attr("primitive_target", "CPU") + self.add_prim_attr("_side_effect", True) self.init_prim_io_names(inputs=['optim_inputs', 'optim_input_shapes'], outputs=['key']) def infer_shape(self, inputs, shapes):