File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1448,20 +1448,6 @@ def _IsInOuterContext(self, op):
14481448 outer_ctxt = outer_ctxt .outer_context
14491449 return True
14501450
1451- def _MaybeAddToWhileContext (self , op ):
1452- """Add a control dependency to the containing WhileContext.
1453-
1454- The added control dependency ensures that the outputs of this op
1455- belong to the WhileContext. Do nothing if the op is not contained
1456- in a WhileContext.
1457-
1458- Args:
1459- op: An operation.
1460- """
1461- while_ctxt = self .GetWhileContext ()
1462- if while_ctxt is not None :
1463- op ._add_control_input (while_ctxt .GetControlPivot ().op )
1464-
14651451 def _MaybeRemoveExternalControlEdges (self , op ):
14661452 """Remove any external control dependency on this op."""
14671453 while_ctxt = self .GetWhileContext ()
@@ -1628,8 +1614,6 @@ def _AddOpInternal(self, op):
16281614 if not op .inputs :
16291615 # Remove any external control dependency on this op
16301616 self ._MaybeRemoveExternalControlEdges (op )
1631- # Add this op to the enclosing while context
1632- self ._MaybeAddToWhileContext (op )
16331617 # pylint: disable=protected-access
16341618 op ._add_control_input (self ._pivot .op )
16351619 # pylint: enable=protected-access
You can’t perform that action at this time.
0 commit comments