reduce the surface of exposure for GIL acquire/release.

PiperOrigin-RevId: 333772874
Change-Id: I669f3f7b92a1f42437ec63f2bca9c35f59990afb
This commit is contained in:
A. Unique TensorFlower 2020-09-25 11:26:43 -07:00 committed by TensorFlower Gardener
parent 9847599622
commit 88f60dc53b

View File

@ -189,7 +189,7 @@ void PythonHooks::CollectData(XPlane* raw_plane) {
}
void PythonHooks::Finalize(XSpace* space) {
if (space) {
if (space && options_.enable_trace_python_function) {
XPlane* plane =
FindOrAddMutablePlaneWithName(space, kPythonTracerPlaneName);
if (options_.end_to_end_mode) {