aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/BUILD
Commit message (Collapse)AuthorAge
* Added ABSL_DEPRECATED annotations to various deprecated TensorFlow functions.Gravatar A. Unique TensorFlower2018-09-19
| | | | PiperOrigin-RevId: 213693027
* [XLA] Add hook for dump directory expansion.Gravatar Chris Leary2018-09-13
| | | | | | | | | Also puts a ".unoptimized" suffix on dumped HLO protobuf files to avoid the unoptimized dumped HLO protobuf colliding with the optimized dumped HLO protobufs when the same dump directory is specified for both. PiperOrigin-RevId: 212914100
* [XLA] Remove remaining StringPiece references.Gravatar Benjamin Kramer2018-09-01
| | | | | | StringPiece and string_view are the same now, no need to convert between them. PiperOrigin-RevId: 211195959
* Change headers to directly include absl::Span, and clean up the buildGravatar Tim Shen2018-08-30
| | | | | | dependencies as well. PiperOrigin-RevId: 211038094
* [XLA] Switch to absl::StrFormat.Gravatar Justin Lebar2018-08-27
| | | | | | | | Unlike Printf, StrFormat does not require type-length qualifiers, e.g %z, %ll. Nor does it require that you call c_str() to print strings. So these are fixed up here as well. PiperOrigin-RevId: 210435915
* [XLA] Stop including str_util.h.Gravatar Justin Lebar2018-08-23
| | | | PiperOrigin-RevId: 210049592
* [XLA] Use absl string types and functions instead of the TF versions.Gravatar Justin Lebar2018-08-23
| | | | | | | Unfortunately this has to be one big patch, because e.g. absl::StrCat doesn't accept a TF StringPiece, but as soon as we switch to absl::string_view, we have to switch away from all of the TF functions. PiperOrigin-RevId: 209957896
* [XLA] gtl::optional->absl::optionalGravatar Yunxing Dai2018-08-21
| | | | PiperOrigin-RevId: 209686671
* Merged commit includes the following changes:Gravatar Yifei Feng2018-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 209663919 by yifeif<yifeif@google.com>: Internal change. -- 209663914 by amitpatankar<amitpatankar@google.com>: Fix the topk_op_test for numpy>1.15. -- 209660476 by jdduke<jdduke@google.com>: Fix model lifetime for TensorFlow Lite C# bindings Ensure the model's existence for the duration of the interpreter, as per API requirements. -- 209655960 by scottzhu<scottzhu@google.com>: Unify RNN Cell interface between TF and Keras. -- 209655731 by A. Unique TensorFlower<gardener@tensorflow.org>: Added tests for PredictionOps and PartitionExamplesOps -- 209655291 by nolivia<nolivia@google.com>: adding rate class so that we can save global_step/sec using tf.contrib.summary. The function takes the rate in relation to any tensors provided that the numerator and denominator are broadcastable and have dtypes that can be cast to float64 -- 209654655 by kramerb<kramerb@google.com>: [XLA] Switch from tensorflow::gtl::InlinedVector to absl::InlinedVector This one comes with extra goodies like a move constructor. -- 209653851 by A. Unique TensorFlower<gardener@tensorflow.org>: Internal build specification change -- PiperOrigin-RevId: 209663919
* [XLA] Use absl::make_unique instead of xla::MakeUnique.Gravatar Justin Lebar2018-08-20
| | | | | | Same for WrapUnique. PiperOrigin-RevId: 209531124
* [XLA] Switch to absl versions of the c_foo functions.Gravatar Justin Lebar2018-08-20
| | | | PiperOrigin-RevId: 209502513
* Automated rollback of commit 4a41f50648929197954d892559587cb76458d306Gravatar A. Unique TensorFlower2018-08-17
| | | | PiperOrigin-RevId: 209248552
* [XLA] Switch to absl versions of the c_foo functions.Gravatar Justin Lebar2018-08-17
| | | | PiperOrigin-RevId: 209247783
* [XLA] This is a step to incrementally move client/xla_client/* to client/.Gravatar A. Unique TensorFlower2018-07-25
| | | | PiperOrigin-RevId: 206111380
* [XLA] Make ShapeUtil::PermuteDimensions() properly permute layouts.Gravatar Justin Lebar2018-07-04
| | | | | | | | | | | | | | | | | Although there was no API comment explaining what PermuteDimensions() intended to do with layouts, the intent seems to be that if the input shape has a layout, then TransposeIsBitcast(input_shape, PermuteDimensions(input_shape, perm), InversePermutation(perm)) is true. This was not previously correct. (I can't really say what the old behavior was, although maybe there's some clever interpretation of what it used to do.) PiperOrigin-RevId: 203290794
* [TF:XLA] Split literal_util into {literal, literal_util}.Gravatar Kay Zhu2018-07-03
| | | | | | | | | Currently Literal classes sits in literal_util.{h,cc} instead of literal.{h,cc}. It also contains helper functions that are better fit to be their own separate class/namespace. This change starts this process by moving most static factory methods to LiteralUtil namespace. PiperOrigin-RevId: 203217065
* Moving StatusOr from XLA to stream_executor.Gravatar Michael Case2018-06-26
| | | | PiperOrigin-RevId: 202179928
* [XLA] Try to validate that shape sizes are sane.Gravatar Michael Kuperstein2018-06-26
| | | | | | | | This won't catch all overflows, but will do the right thing for the "normal" flow. Also fix layout validation to reject padded sparse layouts. PiperOrigin-RevId: 202151215
* Fix assumptions that a Shape must be a tuple or an array.Gravatar Mark Heffernan2018-06-13
| | | | | | | | | | | | A TOKEN primitive type was added with cl/199215963 and XLA also has an OPAQUE primitive type. However, in many places in XLA we assume either a tuple or array. This CL fixes many of those instances, but some may remain. Identified instances were discovered by searching for IsTuple or IsArray so the set of fixes is not exhaustive. Also opportunistically addressed a couple potential points of confusion in the ShapeUtil interface: (1) Rename ShapeUtil::HasZeroElements to ShapeUtil::IsZeroElementArray. The point of confusion here is that tuples can also have zero elements and HasZeroElements would check fail on tuple shapes. Method no longer check fails if the given shape is not an array. (2) ShapeUtil::IsNil now returns true only for empty tuples. Previously it also returned true for zero-element array types which was confusing because ShapeUtil::MakeNil creates an empty tuple. PiperOrigin-RevId: 200452672
* [XLA] Redesign: delete SessionModule.Gravatar A. Unique TensorFlower2018-06-05
| | | | PiperOrigin-RevId: 199361402
* [XLA] Make HloInstruction::backend_config() a JSON-encoded protobuf.Gravatar Justin Lebar2018-05-31
| | | | PiperOrigin-RevId: 198754463
* Add interfaces to Compiler that are sufficient to implement a ↵Gravatar Bjarke Hammersholt Roune2018-05-22
| | | | | | | | backend-independent offline auto-tuner for backend configurations of ops as well as automatic testing across candidate configurations. Also add a simple Scanner class that is handy for parsing things. PiperOrigin-RevId: 197657512
* [XLA] Optimize ShapeTree<T>Gravatar A. Unique TensorFlower2018-05-22
| | | | | | | | | | | | | | This optimizes ShapeTree quite significantly. In particular this optimizes for the common case of querying/iterating, copying and moving ShapeTrees. * Allocate all ShapeTreeNodes inside a single, owned, vector. This reduces the number of memory allocations and improves cache performance. * Instead of storing children nodes as unique_ptrs, store them as indices into the owning container's vector. This allows cheap copy-construction (a std::vector POD copy) and doesn't change the fast path (dereferencing a pointer is just as fast as dereferencing a base + offset). * Instead of a unique_ptr<Shape>, use a shared_ptr<Shape>. This removes a load of copy-construction overhead at the cost of a shared_ptr over a unique_ptr (one extra allocation). * Instead of computing ShapeIndexes on-demand in the iterators/ForEach*, precompute them during construction time. This adds a few more bytes per ShapeTree, but now we can... * ... store a std::pair<ShapeIndex, T> as the ShapeTreeNode's data element. This allows us to provide a std::pair<K,V>&, STL-like interface from iterators without going through any of the previous unique_ptr hacks around storage lifetimes. * Because we no longer need to iterate from the beginning to build up the ShapeIndex, we can now offer a ::find() function to return an iterator for a ShapeIndex in O(K) time. As the iteration order is guaranteed to be pre-order, this can be used (and will be, later) to speed up the fast-path of mutating a subtree of a ShapeTree from tf2xla::ExtractSubBuffers. * Similarly because we now have a very standard, cheap STL interface with no performance cliffs, we can hopefully improve ShapedBuffer's copy and move constructors to be cheaper. PiperOrigin-RevId: 197548717
* [TF:XLA] Remove the need for memcpy from Tensor->Literal.Gravatar Kay Zhu2018-05-15
| | | | | | Introducing a new LiteralOwningSlice class that is similar to LiteraSlice, but owns the root piece. PiperOrigin-RevId: 196759785
* Remove unused BUILD dependenciesGravatar A. Unique TensorFlower2018-05-15
| | | | PiperOrigin-RevId: 196742598
* [XLA] Move more comparison functions to non-test library.Gravatar Chris Leary2018-05-14
| | | | PiperOrigin-RevId: 196605347
* [XLA] s/tensorflow::Status/Status/.Gravatar Justin Lebar2018-05-11
| | | | | | | These are type aliases of one another; we'd like to be consistent and use the shorter one. PiperOrigin-RevId: 196322955
* [XLA] Break out literal comparisons from testonly target.Gravatar Chris Leary2018-05-10
| | | | | | | | | | | | | | Moves methods from LiteralTestUtil::* to Literal::* where they have nothing to do with test infrastructure. Pares down the "void" variants of the LiteralTestUtil methods and consolidates to the version that return success/failure such that the values can be EXPECT_TRUE / ASSERT_TRUE asserted in the caller test cases. This way the literal comparison functionality can be used from cc_libraries that are not test only / cc_binary. PiperOrigin-RevId: 196209410
* Add missing #include for OpResponse. This class currently happens to be forwardGravatar A. Unique TensorFlower2018-05-08
| | | | | | | declared by xla.proto.h, but that proto doesn't actually need this type anywhere and we are working on removing such unneeded forward declarations. PiperOrigin-RevId: 195818397
* [XLA] Redesign: migrate convolution tests.Gravatar A. Unique TensorFlower2018-04-23
| | | | PiperOrigin-RevId: 193998684
* [XLA] Convert XLA to use xla::se as a namespace alias for ::stream_executor.Gravatar Justin Lebar2018-04-17
| | | | PiperOrigin-RevId: 193301997
* Remove all_opensource_files. It's not needed any more.Gravatar Martin Wicke2018-03-28
| | | | PiperOrigin-RevId: 190878279
* [XLA] Add a whole graph execution interface.Gravatar A. Unique TensorFlower2018-03-09
| | | | PiperOrigin-RevId: 188554206
* [XLA:CPU] Don't hard-code lane width in horizontal sum routineGravatar Sanjoy Das2018-02-21
| | | | | | | | | | | | | | | | | | | | | | The bulk of change is actually in dot_operation_test to get it to the point where it would have caught this bug. I made the following changes: - Moved some tests under a "no layout assignment pass runs" mode. This lets us test the layout specific aspects of the dot operation more thoroughly. Unfortunately not many tests can be run in this mode -- for instance dot tests that calls into Eigen won't work here because they need a specific layout assignment for correctness. Tests that runs with layout assignment enabled but with non-default layouts are essentially integration tests that check that the layout assignment pass + the dot lowering work correctly. - Changed the matrix-vector dot tests to check all 4 layouts and the matrix-vector Ax+b fusion tests to check all 8 layouts. - Duplicated some of the F32 tests to run for F64. - Added some new test shapes. PiperOrigin-RevId: 186511289
* Remove unnecessary dependency from xla:typesGravatar Todd Wang2018-01-30
| | | | PiperOrigin-RevId: 183888495
* [XLA] Fix tools broken by cl/183837856Gravatar Chris Leary2018-01-30
| | | | PiperOrigin-RevId: 183862522
* Add py2tf to contrib_py.Gravatar A. Unique TensorFlower2018-01-30
| | | | PiperOrigin-RevId: 183860192
* [XLA] Fix tools broken by cl/183837856Gravatar Chris Leary2018-01-30
| | | | PiperOrigin-RevId: 183862522
* [XLA] Plumb build options via local API.Gravatar Chris Leary2018-01-30
| | | | | | | | | | | | * Break build options into their own translation unit for use from local client and to mirror ExecutableRunOptions. * Add some ToString()s to aid debugging. * Add HLO graph generation regex to build options. * Add SWIG type map for ExecutableBuildOptions. Also fix a build issue occurring on some platforms with triangular_solve. PiperOrigin-RevId: 183837856
* [XLA] Make xla_hlo_profile_test less flakyGravatar Sanjoy Das2018-01-25
| | | | | | | | Instead of relying on some oeprations always taking longer than others (and this appearing in a specific order in the rendered HLO profile), pick them out by opcode. PiperOrigin-RevId: 183268593
* [XLA:TPU] Initial HLO parser/stringifier support for sparse formatsGravatar A. Unique TensorFlower2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add methods for manipulating sparse literals to xla::Literal - Make LayoutUtil::HumanString handle sparse layouts - Make ShapeUtil::ParseShape handle sparse shapes - Syntax for shapes has changed: - Old way of expressing layouts still works, e.g. f32[1,2,3]{2,1,0} - Can now make dense format explicit: f32[1,2,3]dense{2,1,0} - Can express sparse layouts; the max_sparse_elements value is in the braces, e.g.: f32[1,2,3]sparse{10} - The shape should not include braces for the layout if the shape is scalar; e.g. f32[]{} is not valid shape syntax. - The shape should not include braces for the layout if the shape is a dense rank-1 array; e.g. f32[10]{0} is not valid shape syntax - Sparse literals use a dictionary-liky syntax, e.g.: f32[2,3,4]sparse{10} {[0,1,2]: 10, [1,2,3]: 11} - For rank-1 sparse arrays, the square brackets around indices may be omitted, e.g.: f32[100]sparse{10} {5: 10, 20: 30} PiperOrigin-RevId: 181813837
* [XLA] Initial sparse layout supportGravatar A. Unique TensorFlower2018-01-08
| | | | | | | | | | | | Adds SparseIndexArray and support methods to Literal. SparseIndexArray manages the array of sparse indices and is exposed by sparse Literals. Also adds HloSupportChecker classes for CPU and GPU. This will be run as the first HloPass during compilation, and verifies that the graph is supported by the backend. Currently only verifies shapes, and that the layout is not sparse since no backend supports sparse layouts yet. PiperOrigin-RevId: 181244401
* Remove protobuf-compatibility methods from the Literal class.Gravatar Mark Heffernan2018-01-05
| | | | | | | | | | | | | | | | | | | | 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
* Capture tensors that do not trigger convert_to_tensor in defunGravatar Akshay Agrawal2017-12-15
| | | | | | | Returning a closed-over Tensor does not trigger a call to convert_to_tensor, so we need to manually coerce such Tensors to graph tensors and capture them. PiperOrigin-RevId: 179224063
* Merged commit includes the following changes:Gravatar A. Unique TensorFlower2017-12-15
| | | | | | | | | | | | | | | 179221620 by akshayka: Internal cleanup: Delete extraneous print statement in test case. -- 179220917 by A. Unique TensorFlower: [XLA:JF] Make HLO parser recognize negative padding. -- PiperOrigin-RevId: 179221620
* Python library and C++ bindings for creating and compiling local XLA ↵Gravatar Roy Frostig2017-12-15
| | | | | | computations. PiperOrigin-RevId: 179211353
* Merge changes from github.Gravatar Sourabh Bajaj2017-11-30
| | | | PiperOrigin-RevId: 177526301
* Add bfloat support to XLA.Gravatar Yunxing Dai2017-11-13
| | | | | | This is necessary in providing bfloat support in GPU backend. RELNOTES: bfloat support is now added to XLA infra. PiperOrigin-RevId: 175564791
* Automated g4 rollback of changelist 175252067Gravatar Peter Hawkins2017-11-11
| | | | PiperOrigin-RevId: 175401676
* Extend the Array class with more functionality.Gravatar A. Unique TensorFlower2017-11-10
| | | | PiperOrigin-RevId: 175277161