From 78f6478a57891df5417f8d014d8792993bd355bb Mon Sep 17 00:00:00 2001 From: ZPaC Date: Tue, 8 Sep 2020 19:59:37 +0800 Subject: [PATCH] Add side effect flag for push kernel to bypass cse. --- mindspore/ops/operations/other_ops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mindspore/ops/operations/other_ops.py b/mindspore/ops/operations/other_ops.py index 4ac5b8b05..e2db34ca8 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): -- GitLab