Applies the current gpu stream stack to the given operation.
(self, op)
| 4445 | self._gpu_stream_stack.pop_obj() |
| 4446 | |
| 4447 | def _apply_gpu_stream(self, op): |
| 4448 | """Applies the current gpu stream stack to the given operation.""" |
| 4449 | # Apply any gpu stream in LIFO order. We apply here because the result can |
| 4450 | # depend on the Operation's signature, which is computed in the Operation |
| 4451 | # constructor. |
| 4452 | if len(self._gpu_stream_stack) > 0: |
| 4453 | stream_idx = self._gpu_stream_stack.peek_top_obj() |
| 4454 | stream_idx_attr = attr_value_pb2.AttrValue(i=stream_idx) |
| 4455 | op._set_attr("_stream_id", stream_idx_attr) |
| 4456 | |
| 4457 | # pylint: disable=g-doc-return-or-yield |
| 4458 | @tf_contextlib.contextmanager |
no test coverage detected