Create cache key corresponding to a stack handle.
(pfor_input)
| 3023 | |
| 3024 | |
| 3025 | def _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 | |
| 3036 | def _stack_handle_inside_pfor(handle, pfor_input): |
no outgoing calls
no test coverage detected