diff --git a/mindspore/ops/operations/other_ops.py b/mindspore/ops/operations/other_ops.py index 57503ab38b420e85f5ae56c83497d221c05eafa2..efe81ba923e1503089a12e65f85325ade785a150 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):