[PJRT] Rewrite PjRtBuffer::ToLiteralSync to use new shape getters when possible.
It's not possible for tuple buffers (yet?). The eventual goal is for ML frameworks to only call individual getters instead of using PjRtBuffer::{logical_}on_device_shape, since passing around xla::Shapes is expensive and often includes more information than is necessary or even meaningful. We'd like to eventually remove PJRT_Buffer_OnDeviceTrimmedShape from the PJRT C API altogether ({logical_}on_device_shape will likely stay for non-ML framework usage). PiperOrigin-RevId: 549438520
Showing
想要评论请 注册 或 登录