A control trigger node for synchronization in the grad loop. One main use is to keep the pop ops of a stack executed in the iteration order.
(self)
| 244 | |
| 245 | @property |
| 246 | def grad_sync(self): |
| 247 | """A control trigger node for synchronization in the grad loop. |
| 248 | |
| 249 | One main use is to keep the pop ops of a stack executed in the |
| 250 | iteration order. |
| 251 | """ |
| 252 | if self._grad_sync is None: |
| 253 | with ops.control_dependencies(None): |
| 254 | self._grad_sync = control_flow_ops.control_trigger(name="b_sync") |
| 255 | self._grad_sync._set_control_flow_context(self._grad_context) |
| 256 | self._grad_index.op._add_control_input(self._grad_sync) |
| 257 | if self._grad_context.outer_context: |
| 258 | self._grad_context.outer_context.AddInnerOp(self._grad_sync) |
| 259 | return self._grad_sync |
| 260 | |
| 261 | @property |
| 262 | def history_map(self): |
nothing calls this directly
no test coverage detected