From cec24afe2d593a3e15a77142339471bbe3e55ad8 Mon Sep 17 00:00:00 2001 From: Skye Wanderman-Milne Date: Wed, 12 Feb 2020 19:39:24 -0800 Subject: [PATCH] [XLA:Python] Temporarily disable codepath that is causing segfaults. PiperOrigin-RevId: 294817127 Change-Id: I4bb4e51fcebc03dd1dae2bcec69205b95ad686ee --- tensorflow/compiler/xla/python/xla.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tensorflow/compiler/xla/python/xla.cc b/tensorflow/compiler/xla/python/xla.cc index 3d223d5e794..0713cec4fc9 100644 --- a/tensorflow/compiler/xla/python/xla.cc +++ b/tensorflow/compiler/xla/python/xla.cc @@ -677,15 +677,16 @@ PYBIND11_MODULE(xla_extension, m) { GlobalPyRefManager()->CollectGarbage(); PyLocalBuffer* buffer = buffer_obj.cast(); LocalDeviceState* state = buffer->device()->local_device_state(); - if (state->executor()->platform_kind() == se::PlatformKind::kHost && - buffer->on_device_shape().IsArray() && - buffer->on_device_shape().element_type() != BF16) { - py::object out = py::reinterpret_steal( - PyArray_FROM_O(buffer_obj.ptr())); - CHECK(out.ptr() != nullptr) - << buffer->on_host_shape().ToString(/*print_layout=*/true); - return out; - } + // TODO(phawkins): fix occasional segfaults + // if (state->executor()->platform_kind() == se::PlatformKind::kHost + // && buffer->on_device_shape().IsArray() && + // buffer->on_device_shape().element_type() != BF16) { + // py::object out = py::reinterpret_steal( + // PyArray_FROM_O(buffer_obj.ptr())); + // CHECK(out.ptr() != nullptr) + // << buffer->on_host_shape().ToString(/*print_layout=*/true); + // return out; + // } std::shared_ptr literal; { py::gil_scoped_release gil_release;