Browse Source

Add side effect flag for push kernel to bypass cse.

tags/v1.0.0
ZPaC 5 years ago
parent
commit
78f6478a57
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      mindspore/ops/operations/other_ops.py

+ 1
- 0
mindspore/ops/operations/other_ops.py View File

@@ -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):


Loading…
Cancel
Save