diff --git a/torch_xla/csrc/runtime/pjrt_computation_client.cc b/torch_xla/csrc/runtime/pjrt_computation_client.cc index 8eea15107d0..1e67ec306dd 100644 --- a/torch_xla/csrc/runtime/pjrt_computation_client.cc +++ b/torch_xla/csrc/runtime/pjrt_computation_client.cc @@ -56,7 +56,9 @@ std::unordered_map build_index_map( xla::Shape host_output_shape(xla::PjRtBuffer* buffer) { xla::Shape shape = xla::ShapeUtil::MakeShape( buffer->element_type(), buffer->logical_dimensions().value()); - *shape.mutable_layout() = dynamic_cast(buffer->layout().get())->xla_layout(); + *shape.mutable_layout() = + dynamic_cast(buffer->layout().get()) + ->xla_layout(); return xla::ShapeUtil::DeviceShapeToHostShape(shape); }