Commit 728e238d authored by Skye Wanderman-Milne's avatar Skye Wanderman-Milne Committed by TensorFlower Gardener
Browse files

Enable _USE_C_API for CondTest in control_flow_ops_test.py

The only change required to make CondTest pass is changing the various
Operation methods to check self._c_op to determine if the C API is
enabled, instead of self._graph._c_graph or _USE_C_API. This is
because CondContext.AddOp() is called before creating self._c_op in
Operation.__init__(), and AddOp() uses the Operation methods that call
the C API. We need to use the original Python-only code before
self._c_op has been created. I added a comment in ops.py explaining an
alternative to this solution that we may wish to implement later.

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