A control trigger node for synchronization in the forward loop. One main use is to keep the push ops of a stack executed in the iteration order.
(self)
| 220 | |
| 221 | @property |
| 222 | def forward_sync(self): |
| 223 | """A control trigger node for synchronization in the forward loop. |
| 224 | |
| 225 | One main use is to keep the push ops of a stack executed in the |
| 226 | iteration order. |
| 227 | """ |
| 228 | if self._forward_sync is None: |
| 229 | with ops.control_dependencies(None): |
| 230 | self._forward_sync = control_flow_ops.control_trigger(name="f_sync") |
| 231 | self._forward_sync._set_control_flow_context(self._forward_context) |
| 232 | self._forward_index.op._add_control_input(self._forward_sync) |
| 233 | return self._forward_sync |
| 234 | |
| 235 | @property |
| 236 | def grad_context(self): |
nothing calls this directly
no test coverage detected