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

Function _convert_stack_pop_v2

tensorflow/python/ops/parallel_for/pfor.py:3073–3085  ·  view source on GitHub ↗
(pfor_input)

Source from the content-addressed store, hash-verified

3071# called since it is a stateful op.
3072@RegisterPFor("StackPopV2")
3073def _convert_stack_pop_v2(pfor_input):
3074 handle = pfor_input.unstacked_input(0)
3075 stack_cache_key = _stack_cache_key(pfor_input)
3076 stacked = _stack_cache.get(stack_cache_key, None)
3077 # If a StackPushV2 has not been converted yet, we default to unstacked since
3078 # the push could be outside of pfor, or the covertor may not be called if the
3079 # inputs are unconverted.
3080 if stacked is None:
3081 stacked = False
3082 _stack_cache[stack_cache_key] = False
3083 elem_type = pfor_input.get_attr("elem_type")
3084 out = data_flow_ops.stack_pop_v2(handle, elem_type)
3085 return wrap(out, stacked)
3086
3087
3088# parsing_ops

Callers

nothing calls this directly

Calls 5

_stack_cache_keyFunction · 0.85
unstacked_inputMethod · 0.80
wrapFunction · 0.70
getMethod · 0.45
get_attrMethod · 0.45

Tested by

no test coverage detected