Commit 2d8206b6 authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Add Python checks to prevent mixing ops from different while loops.

The executor can currently catch some errors like this by trying to
reconstruct the while loop contexts by tracing the graph from enter
nodes, but this doesn't catch everything and can cause hangs or other
undesirable behavior. This change puts the check in Python and also
provides better debugging information.

In addition, this change refactors some logic from control_flow_ops.py
to a new file, control_flow_util.py. This is so we can call
CheckInputFromValidContext from ops.py without creating circular imports
between ops.py and control_flow_ops.py.

PiperOrigin-RevId: 178161679
parent c2e6d554
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment