7d64e124103c8334b7d8b127cd2eff786959d185 |
|
06-Jan-2018 |
Mark Heffernan <meheff@google.com> |
Remove protobuf-compatibility methods from the Literal class. This CL primarily does two things: (1) Remove the protobuf-compatibility methods (eg, mutable_f32s()) from Literal. These were added to Literal as part of the migration of Literal from a proto to a c++ class. Now that Literal is a proper class, these protobuf methods make it difficult to enforce invariants and expose too much of the class' implementation details. (2) Make shape an immutable property of Literals, and make shape and the data members holding the Literal data coherent by construction. Previously, the shape could be set arbitrarily, and the data members such as f32_ could be arbitrarily sized irrespective of the shape of the literal. The remainder of the CL mostly deals with the fallout. Notable other changes: - Literal is no longer a recursive data structure. To avoid copies when passing a subliteral of a tuple-shaped Literal, a LiteralView class is added which provides a read-only view of an arbitrary subliteral. - Tuple-shaped Literals can no longer be built up incrementally so to avoid copying Literal values during construction, the following methods with move semantics are added: Literal::MoveFrom and Literal::MoveIntoTuple. These methods transfer ownership the underlying buffers enabling, for example, a literal to be moved into an element of a tuple-shaped literal with no data copying. - Replace the internal data structure holding the actual data from a bunch of std::vectors (eg, s32s_, f32s, etc) to a single ShapeTree<char*>. This significantly simplifies accessors and makes improved support of tuple-shaped literals much easier (eg, Literal::Get<>() can now access elements in arbitrary subliterals). Also, Literal is made movable, but not copyable. Otherwise, it is all too easy to accidentally introduce expensive copies of Literals. Literal::Clone is added to handle the case where a copy is needed (Literal::CloneToUnique already exists). PiperOrigin-RevId: 181014890
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
fc2526a8c1cf0bc2a93c8cc819ff7209eb4628c9 |
|
16-Dec-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
Merged commit includes the following changes: 179277894 by gunan: Run buildifier on build file. -- 179275101 by meheff: Replace DeviceMemoryBase with ShapedBuffer in XLA interfaces. Executable, TransferManager, and AllocationTracker now use ShapedBuffer to hold device memory addresses holding XLA data. Most of the change is straight-forward with the exception of AllocationTracker which was mostly rewritten (and simplified) and some refactoring in the CPU executable. Also, have ShapedBuffer hold on-host and on-device Shapes which are the shapes of the representation of the data on the host and device, respectively. This is necessary because with cl/178624364 the on-host and on-device shape may no longer be equal. -- 179265385 by A. Unique TensorFlower: Return error rather than CHECK fail in Executable::ExecuteOnStreamWrapper -- 179264551 by dandelion: Internal fixes. -- PiperOrigin-RevId: 179277894
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
22d948d2739ecaadfb4091302f2050ba9cf0d0c1 |
|
16-Nov-2017 |
Mark Heffernan <meheff@google.com> |
Add methods on TransferManager which transfer to/from device memory specified by ShapedBuffer rather than DeviceMemoryBase. This is part of a broader replacement of DeviceMemoryBase->ShapedBuffer in several XLA interfaces. With this change TransferManager no longer has to allocate memory to transfer tuples to the device. The existing methods using DeviceMemoryBase will be removed in a followup cl. Various related changes: * Make the transfer_manager_test an xla_test so that it runs on all the platforms. * Make several of the TransferManager methods protected. * Change ScopedShapedBuffer::Allocate to only allocate device memory buffers, and not fill in the tuple index table. The index table is filled in by the transfer manager. This is a cleaner separation of concerns. PiperOrigin-RevId: 176015628
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
3f7d27ae53095a140994b3c0c00b12f7a6f5fd06 |
|
07-Nov-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
Mark TransferManager::GetByteSizeRequirement and virtual overrides const. PiperOrigin-RevId: 174873299
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
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/generic_transfer_manager.cc
|
7de939bb74c5edbc2f45e77a5d4696e70bb59e5b |
|
19-Sep-2017 |
Kay Zhu <kayzhu@google.com> |
[TF:XLA] Create Interpreter backend from the Executor backend. - Move plugin/executor to xla/service/interpreter/ - Remove executor's TransferManager, and use GenericTransferManager instead. - Renamings and minor fixes. PiperOrigin-RevId: 169160056
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
0550f50bfd1b02687d517928b5a7ce776e8892fc |
|
14-Sep-2017 |
Benjamin Kramer <kramerb@google.com> |
[XLA] Remove Literal::Swap and replace all uses with moves. This stems from the dark ages when Literal was an unmovable proto. Swap was supposed to be fast (it moves) but in the conversion to a standalone class Swap wasn't implemented properly and became a 3-way copy instead of a 3-way move. All of the users want move anyways, so just remove Swap and use moves on all call sites. If actual swapping is needed, std::swap will work just fine for Literal, and the default implementation is as fast as 3 moves. PiperOrigin-RevId: 168689138
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
ea125c27974135fbad6bcb75b720499c68d52357 |
|
14-Jul-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
[XLA] Pass shape/layout information in calls to the CPU runtime routines. Previously the CPU runtime wouldn't know how the data that was being outfed was laid out by the XLA LayoutAssignment pass, which could result in transposed-value results. This also allows us to validate the contract between the host program and the compiled XLA program with (reified) runtime type checks. PiperOrigin-RevId: 161895093
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
9e89636e6aa2be508fad22089c61659ce87f6e67 |
|
11-Jul-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
[XLA:CPU] Support for CPU outfeed and a xfeed (infeed/outfeed) test. Note: does not yet support nested tuples, for symmetry with the current infeed limitations. PiperOrigin-RevId: 161502502
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
46737e4e81314f7482bfd6a710f126a27f5d7975 |
|
19-Jun-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
Remove class xla::LiteralUtil. NFC (mind-numbingly so). This patch removes class xla::LiteralUtil and rewrites every call to use class xla::Literal instead. PiperOrigin-RevId: 159446373
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
b52debb4e63cce1e0733d6d34975d4efb9934680 |
|
15-Jun-2017 |
Jacques Pienaar <jpienaar@google.com> |
[XLA] Add transfer buffer to infeed. Mirroring the transfer buffer to device interface, add a transfer buffer to infeed interface. PiperOrigin-RevId: 159152897
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
8cb5e9867482a8e05f756fad35634e1674fe7f16 |
|
25-May-2017 |
A. Unique TensorFlower <gardener@tensorflow.org> |
Preliminary Infeed support for GPU backend. ** GPU transfer manager and GPU specific infeed manager/infeed buffer implementation ** Infeed thunk PiperOrigin-RevId: 157054373
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
3088d3664a99e7cb81ee190f4d65f4bd10407f42 |
|
29-Mar-2017 |
David Majnemer <majnemer@google.com> |
[XLA] Move kPad from GpuElementalIrEmitter::MakeElementGenerator to ElementalIrEmitter::MakeElementGenerator There is nothing GPU specific in GpuElementalIrEmitter::MakeElementGenerator for kPad. Move it into the base implementation so that all subcalses have it as an implementation. Change: 151564674
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
bc456e361d49d1d89a74b80060c70efb51fd7d87 |
|
23-Mar-2017 |
Martin Wicke <wicke@google.com> |
Merge changes from github. Change: 151046259
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
efc8f98d45df835bac2373e19f1da57e3a1ea2d0 |
|
28-Feb-2017 |
Jacques Pienaar <jpienaar@google.com> |
[XLA] Add basic outfeed support. Change: 148699787
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
d117658489f1c9226e6e979e816ef23a7187f775 |
|
31-Jan-2017 |
David Majnemer <majnemer@google.com> |
[XLA] Fix uses of ShapeUtil::ByteSizeOf to use proper pointer size We missed a few places, lets be more explicit and make the pointer_size parameter necessary for TUPLE shapes. Change: 146066214
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
99e1b19ceba32b8354dddc2841b81864c9ba96bb |
|
12-Jan-2017 |
Jacques Pienaar <jpienaar@google.com> |
Clarify ResetDevice operates on all devices associated with backend. Change: 144258290
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|
1e67c90e2caceeff82d09793d1ef5fa0300d219b |
|
09-Jan-2017 |
Peter Hawkins <phawkins@google.com> |
Initial open-source release of XLA: Accelerated Linear Algebra. XLA is a compiler-based linear algebra execution engine that targets CPUs, GPUs and custom accelerators. XLA is still experimental; we are releasing it early to get the community involved. Change: 143990941
/external/tensorflow/tensorflow/compiler/xla/service/generic_transfer_manager.cc
|