Introduce control_flow_util_v2.py
This new module includes: * FuncGraph subclasses for different kinds of control flow. This can be used to determine if the current graph is building control flow. * in_defun() method to determine if the containing context should follow defun or v1 graph semantics. * Shared functionality between cond_v2 and while_v2. This functionality will be used in future changes. I made a new file rather than reusing control_flow_util.py due to import cycles. If/when we get rid of the old control flow, these files can be consolidated. PiperOrigin-RevId: 217235279
Loading
Please sign in to comment