History log of /external/tensorflow/tensorflow/compiler/xla/service/gpu/gpu_transfer_manager.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
06deeea373c93ea36547648481c5daf4dc56126f 27-Sep-2017 Mark Heffernan <meheff@google.com> For tuple-shaped data, change ShapedBuffer (an abstraction holding on-device data of a given shape) to also hold an array of pointers representing the tuple structure in the device memory. Previously ShapedBuffer only held array-shaped data at the leaves of the tuple shape. Construction of these array-of-pointers is handled by TransferManager which has to construct array-of-pointers anyway to transfer literals to the device. This change makes ShapedBuffer match the native representative of tuple-shaped data passed into XLA computations. This is the first step to migrating XLA interfaces away from using naked device memory pointers (DeviceMemoryBase) to using more expressive ShapedBuffers instead.

This change enables tuple-shaped parameters in computations run through the LocalClient interface.

Also, change LocalClient interfaces to return ScopedShapedBuffers as these are generally easier to deal with ownership-wise that ShapedBuffers. They are analogous to std::unique_ptr, while ShapedBuffers are analogous to bare pointers.

This change includes a couple other cleanups found along the way:

* move cpu/gpu/interpreter transfer managers into their respective directories under xla/service.

* Make the generic transfer manager take a pointer size. Previously it would just use sizeof(void*) which might not be exactly what is needed.

PiperOrigin-RevId: 170133015
/external/tensorflow/tensorflow/compiler/xla/service/gpu/gpu_transfer_manager.h