[XLA:Python] Temporarily disable codepath that is causing segfaults.
PiperOrigin-RevId: 294817127 Change-Id: I4bb4e51fcebc03dd1dae2bcec69205b95ad686ee
This commit is contained in:
parent
73c31e6c97
commit
cec24afe2d
@ -677,15 +677,16 @@ PYBIND11_MODULE(xla_extension, m) {
|
|||||||
GlobalPyRefManager()->CollectGarbage();
|
GlobalPyRefManager()->CollectGarbage();
|
||||||
PyLocalBuffer* buffer = buffer_obj.cast<PyLocalBuffer*>();
|
PyLocalBuffer* buffer = buffer_obj.cast<PyLocalBuffer*>();
|
||||||
LocalDeviceState* state = buffer->device()->local_device_state();
|
LocalDeviceState* state = buffer->device()->local_device_state();
|
||||||
if (state->executor()->platform_kind() == se::PlatformKind::kHost &&
|
// TODO(phawkins): fix occasional segfaults
|
||||||
buffer->on_device_shape().IsArray() &&
|
// if (state->executor()->platform_kind() == se::PlatformKind::kHost
|
||||||
buffer->on_device_shape().element_type() != BF16) {
|
// && buffer->on_device_shape().IsArray() &&
|
||||||
py::object out = py::reinterpret_steal<py::object>(
|
// buffer->on_device_shape().element_type() != BF16) {
|
||||||
PyArray_FROM_O(buffer_obj.ptr()));
|
// py::object out = py::reinterpret_steal<py::object>(
|
||||||
CHECK(out.ptr() != nullptr)
|
// PyArray_FROM_O(buffer_obj.ptr()));
|
||||||
<< buffer->on_host_shape().ToString(/*print_layout=*/true);
|
// CHECK(out.ptr() != nullptr)
|
||||||
return out;
|
// << buffer->on_host_shape().ToString(/*print_layout=*/true);
|
||||||
}
|
// return out;
|
||||||
|
// }
|
||||||
std::shared_ptr<Literal> literal;
|
std::shared_ptr<Literal> literal;
|
||||||
{
|
{
|
||||||
py::gil_scoped_release gil_release;
|
py::gil_scoped_release gil_release;
|
||||||
|
Loading…
Reference in New Issue
Block a user