From 9e62c648a84f664fe338e1dec2db0f5e89ec3147 Mon Sep 17 00:00:00 2001 From: Chris Leary Date: Fri, 16 Mar 2018 07:40:49 -0700 Subject: [PATCH] [XLA:python] Fix a bug where returning an status would not incref Py_None. PiperOrigin-RevId: 189337748 --- tensorflow/compiler/xla/python/local_computation_builder.i | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/compiler/xla/python/local_computation_builder.i b/tensorflow/compiler/xla/python/local_computation_builder.i index b535413..b2681d5 100644 --- a/tensorflow/compiler/xla/python/local_computation_builder.i +++ b/tensorflow/compiler/xla/python/local_computation_builder.i @@ -216,6 +216,7 @@ tensorflow::ImportNumpy(); PyExc_RuntimeError, $1.ToString().c_str()); return NULL; } + Py_INCREF(Py_None); $result = Py_None; } -- 2.7.4