MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _apply_gpu_stream

Method _apply_gpu_stream

tensorflow/python/framework/ops.py:4447–4455  ·  view source on GitHub ↗

Applies the current gpu stream stack to the given operation.

(self, op)

Source from the content-addressed store, hash-verified

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

Callers 1

_create_op_helperMethod · 0.95

Calls 2

peek_top_objMethod · 0.80
_set_attrMethod · 0.80

Tested by

no test coverage detected