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

Function _stack_cache_key

tensorflow/python/ops/parallel_for/pfor.py:3025–3033  ·  view source on GitHub ↗

Create cache key corresponding to a stack handle.

(pfor_input)

Source from the content-addressed store, hash-verified

3023
3024
3025def _stack_cache_key(pfor_input):
3026 """Create cache key corresponding to a stack handle."""
3027 op_type = pfor_input.op_type
3028 assert op_type in ["StackPushV2", "StackPopV2"], op_type
3029 orig_handle = pfor_input.op.inputs[0]
3030 while orig_handle.op.type in ["Identity", "Enter"]:
3031 orig_handle = orig_handle.op.inputs[0]
3032 assert orig_handle.op.type == "StackV2", orig_handle.op
3033 return ops.get_default_graph(), pfor_input.pfor, orig_handle
3034
3035
3036def _stack_handle_inside_pfor(handle, pfor_input):

Callers 2

_convert_stack_push_v2Function · 0.85
_convert_stack_pop_v2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected