aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/tests/test_utils.cc
Commit message (Collapse)AuthorAge
* [XLA] Add documentation and HLO-level support for multi-value sort.Gravatar Michael Kuperstein2018-10-09
| | | | | | No support in any of the backends, and not yet exposed through XlaBuilder. PiperOrigin-RevId: 216465753
* Global de-std::unique_ptr cleanup for xla::Literal.Gravatar A. Unique TensorFlower2018-09-10
| | | | PiperOrigin-RevId: 212313258
* Split out HloDotInstruction as subclass from HloInstruction.Gravatar A. Unique TensorFlower2018-09-06
| | | | PiperOrigin-RevId: 211912785
* [XLA] Rename all (Mutable)ArraySlice to absl::Span.Gravatar Tim Shen2018-08-30
| | | | PiperOrigin-RevId: 210998142
* Automated rollback of commit 065f9b833ffbb3b2f03d63febb186275674ba133Gravatar Michael Kuperstein2018-08-29
| | | | PiperOrigin-RevId: 210816152
* Automated rollback of commit 150dee25d82589ca109957cc996efbd2a236e044Gravatar Michael Kuperstein2018-08-29
| | | | PiperOrigin-RevId: 210778248
* [XLA] Implement variadic reduce in the evaluator. It is currently supported ↵Gravatar Michael Kuperstein2018-08-29
| | | | | | only for the case where all of the inputs have the same element type. PiperOrigin-RevId: 210746149
* [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] Add and use a layout-sensitive HLO verifier.Gravatar Justin Lebar2018-08-24
| | | | | | | | | | | | | | For now, this verifier checks some noncontroversial invariants, like: - Fusion operands and fusion computation parameters must have matching layouts. - Same for while loops, calls, kConditional. It's a bit of a pain to add these explicit layout-sensitive and allow-mixed-precision flags everywhere, but I think it's better than adding default args. With default args we can easily mix up the order, and we'd only be able to add new flags to the end of the list. PiperOrigin-RevId: 210059349
* [XLA] Use absl::make_unique instead of xla::MakeUnique.Gravatar Justin Lebar2018-08-20
| | | | | | Same for WrapUnique. PiperOrigin-RevId: 209531124
* Various improvements to MakeFakeArguments.Gravatar Mark Heffernan2018-08-16
| | | | | | Add an overload which takes a random number generator to enable generation of different random values in sequential calls to MakeFakeArguments. Add a mechanism for generating arrays of unique values (no duplicates) for the key inputs to key/value kSorts. Remove some sorcery in generating float arrays and replace with a uniform distribution. The underlying reason for using this strange distribution no longer exist. PiperOrigin-RevId: 209083904
* Support multiple index-space constraints in synthetic input generator.Gravatar Mark Heffernan2018-08-15
| | | | PiperOrigin-RevId: 208868489
* [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
* Handle nested tuples in GpuTransferManager.Gravatar Adrian Kuegel2018-06-29
| | | | | | | | This became necessary when the TOKEN primitive type was added. In some models, an existing tuple T is extended to (T, token[]). Also add the TOKEN case to a switch statement where it was missing. PiperOrigin-RevId: 202643759
* Fix a bug in test_util when generating index for dynamic sliceGravatar Yunxing Dai2018-06-20
| | | | | | dynamic slice's index space should be it's first operand's shape. PiperOrigin-RevId: 201454414
* Add features to HloRunner for running while leaving buffers on the device ↵Gravatar Bjarke Hammersholt Roune2018-05-29
| | | | | | and add option to test_utils for generating more-boring data much faster. PiperOrigin-RevId: 198502753
* [TF:XLA] remove re-initializations of LiteralsGravatar Nick Desaulniers2018-05-17
| | | | | | | | | | | | | | | | It's an antipattern to have: auto x = Literal::CreateFromShape(my_shape); x->Populate(); as that results in initialization followed by reinitialization. Can be replaced with: auto x = MakeUnique<Literal>(my_shape); x->Populate(); Suggested-by: Kay Zhu <kayzhu@google.com> PiperOrigin-RevId: 197007127
* [TF:XLA] clean up interface to xla::VerifyHloModuleGravatar Nick Desaulniers2018-05-04
| | | | | | It seems that the first argument, platform, is unused. PiperOrigin-RevId: 195309504
* [XLA] Convert XLA to use xla::se as a namespace alias for ::stream_executor.Gravatar Justin Lebar2018-04-17
| | | | PiperOrigin-RevId: 193301997
* Introduced tool to run an HLO module in replicated fashion, by infeeding ↵Gravatar A. Unique TensorFlower2018-04-12
| | | | | | | | | random data and outfeeding the data generated at each step. The arguments of the computation can be either read from the session module, or randomly generated. The tool uses the raw transfer manager API to infeed and outfeed the data. PiperOrigin-RevId: 192628605
* [TF:XLA] fix a segfault in MakeFakeArguments, and add a test case.Gravatar Nick Desaulniers2018-04-10
| | | | PiperOrigin-RevId: 192310749
* [XLA] Better support for mul reductions in MakeFakeArguments()Gravatar Michael Kuperstein2018-04-05
| | | | | | Mul reductions want a 1 as their init value, not a 0 or a random value. PiperOrigin-RevId: 191802819
* [TF:XLA] Add half precision support to test_utils.Gravatar Bixia Zheng2018-04-03
| | | | PiperOrigin-RevId: 191535944
* [XLA] Pass the module to HloDataflowAnalysis by const reference.Gravatar Michael Kuperstein2018-02-16
| | | | PiperOrigin-RevId: 186072673
* Create different data for each Literal when creating fake data.Gravatar Mark Heffernan2018-01-26
| | | | | | | | | | | Thread a generator through the functions for creating fake arguments so the same generator can be reused which avoids repeating the same data patterns for each argument generated. Also tweak the position-dependent biasing heuristic to create both positive and negative numbers for small literals. PiperOrigin-RevId: 183473588
* Generate more numerically stable random inputs.Gravatar Blake Hechtman2018-01-12
| | | | PiperOrigin-RevId: 181746741
* Allow backends to specify a custom ShapeVerifier to HloVerifier.Gravatar Brian Patton2018-01-11
| | | | | | | | Remove obsolete shape_size_fn_ from HloVerifier/ShapeVerifier. Adds a rank check to FFT shape inference. PiperOrigin-RevId: 181601294
* * Make fake argument generation see through ReducePrecision and Convert ops ↵Gravatar Bjarke Hammersholt Roune2018-01-05
| | | | | | | | | | | when determining constraints. * Generate both positive and negative numbers as a work-around for the CPU reduce implementation having poor numerical stability. * You can now VLOG hlo_runner to see the results. PiperOrigin-RevId: 180993147
* [XLA] Remove a false invariant used in generating test inputs.Gravatar Nick Desaulniers2018-01-03
| | | | | | | | | This invariant is incorrect; the parameter will never be the shape of the use's first operand; in fact the param should match operand(1)'s shape for DynamicSlice and operand(2)'s shape for DynamicUpdateSlice (since start_indices is the argument that we are trying to constrain the bounds for). This is checked for in CreateLiteralForConstrainedUses(). PiperOrigin-RevId: 180717508
* Resolves an issue that came up with ResNet50 when using the CPU backend as a ↵Gravatar Bjarke Hammersholt Roune2017-12-15
| | | | | | | | | reference. * The CPU now handles window reversal on convolutions instead of ignoring it. * The GPU backend now reports an error on window reversal instead of ignoring it. PiperOrigin-RevId: 179226118
* * HloTestBase now prints out the HLO parser error message when there is one.Gravatar Bjarke Hammersholt Roune2017-12-11
| | | | | | | * TestUtils now supports generating random literals with more than one constraint. There is still an error if the constraints conflict. PiperOrigin-RevId: 178720092
* Add bfloat16 support to the CPU backend.Gravatar Bjarke Hammersholt Roune2017-12-08
| | | | | | | | | | * A few ops, in particular Convert, directly support bfloat16. * Added an HLO pass HloElementTypeConverter which converts graphs away from bfloat16 without changing the numerics, using Convert ops. This can be improved in many ways, but the feature here is that one can run XLA graphs that use bfloat16 on the CPU backend and get the correct result. PiperOrigin-RevId: 178419829
* Rather than make potentially complex modifications to the Hlo graph, simply ↵Gravatar Nick Desaulniers2017-12-05
| | | | | | | | | generate input data that is constrained for certain entry computation parameters. Generate fake literals that are within bounds for DynamicSlice and other operations that accept dynamically computed indices. PiperOrigin-RevId: 178006866
* Add test util for setting init_value of SumReduce, ReduceWindow, and ↵Gravatar Nick Desaulniers2017-11-15
| | | | | | SelectAndScatter ops to a Constant 0.0f. PiperOrigin-RevId: 175864310
* Move MakeFakeLiteral from client/lib/testing.h to tests/test_utils.h. Also ↵Gravatar Mark Heffernan2017-11-10
remove superfluous literal creation methods in that file, and replace them with the existing ones in the Literal class. Also, optionally print layout in Literal::ToString. PiperOrigin-RevId: 175076277