aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction.h
Commit message (Collapse)AuthorAge
* Change user_set to an absl::flat_hash_set in HloInstruction.Gravatar A. Unique TensorFlower2018-10-10
| | | | | absl::flat_hash_set have better performance than a std::unordered_set, which can improve overall compile time. PiperOrigin-RevId: 216498767
* [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
* Add custom call with layout constraints.Gravatar Mark Heffernan2018-10-08
| | | | | | Add a variant of CustomCall which specifies arbitrary layout constraints on the operands and result. The existing non-layout-constrained CustomCall is changed to have no layout preference and can now be assigned arbitrary layouts by layout assignment. PiperOrigin-RevId: 216249615
* [XLA] Delete IsInplaceSlice.Gravatar Yuanzhong Xu2018-10-03
| | | | PiperOrigin-RevId: 215681153
* [XLA] Support parsing the canonical format of HLO text.Gravatar A. Unique TensorFlower2018-10-02
| | | | | | Also stop truncating operands in the canonical format. PiperOrigin-RevId: 215466465
* [XLA] Migrate from gtl::FlatMap to absl::flat_hash_mapGravatar Benjamin Kramer2018-10-01
| | | | PiperOrigin-RevId: 215272497
* Add opaque field to custom call.Gravatar Mark Heffernan2018-09-27
| | | | | | The intent of this field is to enable more information to be encoded in the custom call and passed through to the backend. PiperOrigin-RevId: 214800539
* [TF:XLA] Change HloPtrComparator to work across HLO modules. Declaring the ↵Gravatar Dimitris Vardoulakis2018-09-18
| | | | | | method out of line does not increase compile time. PiperOrigin-RevId: 213571783
* [TF:XLA] Document that the order of control predecessors matters.Gravatar Dimitris Vardoulakis2018-09-18
| | | | PiperOrigin-RevId: 213528296
* Global de-std::unique_ptr cleanup for xla::Literal.Gravatar A. Unique TensorFlower2018-09-10
| | | | PiperOrigin-RevId: 212313258
* Don't print control dependencies when dumping HLO profileGravatar HyoukJoong Lee2018-09-10
| | | | PiperOrigin-RevId: 212275570
* [XLA] Sink PrecisionConfig into Hlo{Dot,Convolution}InstructionGravatar David Majnemer2018-09-07
| | | | | | | | This field only makes sense on kDot & kConvolution. This should shave a few more bytes off of HloInstruction and remove methods that aren't applicable on many HLOs. PiperOrigin-RevId: 211985502
* Split out HloDomainInstruction as subclass form HloInstruction.Gravatar A. Unique TensorFlower2018-09-06
| | | | PiperOrigin-RevId: 211916428
* Split out HloDotInstruction as subclass from HloInstruction.Gravatar A. Unique TensorFlower2018-09-06
| | | | PiperOrigin-RevId: 211912785
* [XLA] Rename PrecisionConfigProto to PrecisionConfigGravatar David Majnemer2018-09-05
| | | | | | The "Proto" suffix adds little clarity but makes a long type name even longer. PiperOrigin-RevId: 211693871
* [XLA] Make kConvolution, kDot HLO attributes mandatoryGravatar David Majnemer2018-09-04
| | | | | | | | HLO transformations would forget to propagate the feature depth attribute. Making these attributes mandatory, while slightly less convenient for tests, makes HLO transformations more robust. PiperOrigin-RevId: 211490160
* Call Cudnn also for grouped convolutions.Gravatar Adrian Kuegel2018-09-03
| | | | | | | | Cudnn supports grouped convolutions, so we don't need the ConvolutionFeatureGroupConverter pass and can instead set the group_count parameter on the cudnn custom calls. PiperOrigin-RevId: 211339551
* Change headers to directly include absl::Span, and clean up the buildGravatar Tim Shen2018-08-30
| | | | | | dependencies as well. PiperOrigin-RevId: 211038094
* [XLA] Rename all (Mutable)ArraySlice to absl::Span.Gravatar Tim Shen2018-08-30
| | | | PiperOrigin-RevId: 210998142
* [XLA] xla::ContainersEqual -> absl::c_equalGravatar Benjamin Kramer2018-08-30
| | | | | | The replacement for the initializer_list overload is a bit sad because MakeSpan doesn't understand initializer_list (and we don't have CTAD yet) PiperOrigin-RevId: 210974939
* [XLA] Implement kIota for CPU & GPU, extend it w/ broadcast semanticsGravatar David Majnemer2018-08-28
| | | | | | | This extends the Iota HLO to have a broadcast field. This allows for higher rank kIota operations. PiperOrigin-RevId: 210600435
* [XLA] Add the xla interface for CollectivePermute.Gravatar A. Unique TensorFlower2018-08-28
| | | | PiperOrigin-RevId: 210576458
* [XLA] Unify spelling of 'fusible'Gravatar Benjamin Kramer2018-08-27
| | | | | | Of {fusable, fusile, fusible} my dictionary only knows about fusible. PiperOrigin-RevId: 210373347
* Run AddSpecialCaseCopies in HloRematerialization.Gravatar Mark Heffernan2018-08-24
| | | | | | RemoveUnnecessaryCopies which runs in rematerialization to take advantage of scheduling can sometimes remove copies which are needed to non-interference reasons. This requires running AddSpecialCaseCopies to add them back in. Furthermore, the schedule needs to be updated to account for the changes to the module, so add an UpdateSchedule function which can patch up a schedule in light a limited set of transformations to the module (addition and deletion of instructions). PiperOrigin-RevId: 210186375
* [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
* Reduce the memory usage of sharding domainsGravatar A. Unique TensorFlower2018-08-23
| | | | | | | | | | | | | | | | | | | Previously the domain instructions inserted before and after an `n` element tuple required `O(n^2)` memory (and compute) because every operand and user had its own domain instruction with a tuple sharding and tuple shape for the exit domains what constructed `n` HloSharding and `n` Shape proto per domain. After this change we keep track of the domain instructions inserted and if we already have a domain instruction with the correct operand and metadata then we re-use it instead of creating a new one. Additionally we change HloInstruction and ShardingMetadata to store a std::shared_ptr to HloSharding so the same instance can be shared by many instructions. This CL doesn't update all uses to remove all of the duplicated HloShardings but handles the most wastful cases to reduce memory usage. PiperOrigin-RevId: 209924260
* [XLA] Cleanup Alltoall.Gravatar A. Unique TensorFlower2018-08-22
| | | | | | | | - Remove unused field 'cross_replica_sum_barrier' for Alltoall. - Update cost analysis. There's no computation in Alltoall. - Cleanup stale TODOs. PiperOrigin-RevId: 209814190
* Change subgroup interface for CrossReplicaSumGravatar HyoukJoong Lee2018-08-22
| | | | PiperOrigin-RevId: 209780185
* [XLA] Expose a way to control dot/conv precisionGravatar David Majnemer2018-08-22
| | | | | | | | | | This adds a field to the proto so that we may serialize it. On TPUs, we can simulate higher precision by splitting a float32 number into several bfloat16 numbers such that their sum closely approximates the original number. A tensor contraction operation like convolution or a dot product can be computed by forming several partial products which approximate the correct answer to a closer margin. PiperOrigin-RevId: 209720948
* [XLA] gtl::optional->absl::optionalGravatar Yunxing Dai2018-08-21
| | | | PiperOrigin-RevId: 209686671
* Remove HostCompute HLO.Gravatar Tong Shen2018-08-21
| | | | | | Now for host compute, we just emit SendToHost & RecvFromHost pairs, and use token to ensure dependency. PiperOrigin-RevId: 209671416
* 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
* Improve gather ergonomics by renaming fields.Gravatar Sanjoy Das2018-08-16
| | | | | | | | | | | | | This CL renames the various inputs to the Gather HLO to be more mnemonic by making it more obviously a batch dynamic-slice. The replacements I made are: s/elided_window_dims/collapsed_slice_dims/g s/window_bounds/slice_sizes/g s/gather_dims_to_operand_dims/start_index_map/g s/gather_indices/start_indices/g s/output_window_dims/offset_dims/g PiperOrigin-RevId: 209051067
* Add a feature_group_size parameter to the Convolution HLO op.Gravatar Adrian Kuegel2018-08-16
| | | | | | | This is a first step towards supporting grouped convolutions, which are a generalization of depthwise convolution. PiperOrigin-RevId: 208950311
* Require token operand for infeed and outfeed.Gravatar Mark Heffernan2018-08-15
| | | | | | For expediency in rolling out support for tokens used for ordering side-effecting ops, infeed and outfeed *optionally* took a token operand. This CL removes that option so all infeed and outfeed instructions take a token operand. PiperOrigin-RevId: 208927968
* [XLA] Add the xla interface for AllToAll.Gravatar A. Unique TensorFlower2018-08-08
| | | | PiperOrigin-RevId: 207971529
* [XLA] Introduce variadic version of reduce.Gravatar Michael Kuperstein2018-08-02
| | | | | | This defines the semantics, and adds parser and shape inference support. Since support is not plumbed through the rest of the compiler here, multi-output reduce is still rejected by the HLO verifier, and is not exposed through XlaBuilder. PiperOrigin-RevId: 207148035
* [XLA] Add Scatter HLO.Gravatar A. Unique TensorFlower2018-08-01
| | | | PiperOrigin-RevId: 207045468
* Cleanup the sharding unique device API.Gravatar A. Unique TensorFlower2018-07-31
| | | | PiperOrigin-RevId: 206885051
* [XLA] Cleanup: remove the default value of all_reduce_id in the declaration.Gravatar A. Unique TensorFlower2018-07-30
| | | | | | Default value could be error-prone. E.g., some hlo passes might forget to handle it. PiperOrigin-RevId: 206665186
* Start implementation of Iota HLO.Gravatar Nick Desaulniers2018-07-20
| | | | PiperOrigin-RevId: 205447892
* Add single-sided host send and receive operations.Gravatar Mark Heffernan2018-07-17
| | | | | | | | Adds a bit on kSend/kReceive instructions and their Done variants indicated whether the operations communicates with the host or another device (the default). Host send/recv operations are single-sided without a complementary recv/send instruction in another module. Host send/recv operations are exposed in the XLA builder API as SendToHost and RecvFromHost. PiperOrigin-RevId: 205008138
* [XLA] Enable the semantic for cross-modeul AllReduce.Gravatar A. Unique TensorFlower2018-07-15
| | | | PiperOrigin-RevId: 204670087
* [XLA] Split out HloGatherInstruction as subclass from HloInstruction.Gravatar A. Unique TensorFlower2018-07-12
| | | | PiperOrigin-RevId: 204421652
* [XLA] Generalize sort semantics to Rk.Gravatar Michael Kuperstein2018-07-10
| | | | PiperOrigin-RevId: 203997296
* Add WithToken variants to Send/Recv/Infeed/Outfeed ops in XLA builder.Gravatar Mark Heffernan2018-07-09
| | | | | | | | In HLO side-effecting ops now take and produce a token-shaped value used for ordering. This CL exposes the tokens in the XLA builder interface by adding builder variants suffixed with "WithToken". These variants have an extra token-shaped operand and produce a token, sometimes as a element in the tuple-shaped output of the op. Also, at the HLO level, add new method CreateToken for creating an instruction which produces token-shaped value out of thin air using an AfterAll instruction. This is explicitly broken out from CreateAfterAll to facilitate remove of zero-operand AfterAll instructions (b/110532604). PiperOrigin-RevId: 203834271
* [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
* Change Send and Recv HLOs to take a token operand.Gravatar Mark Heffernan2018-07-02
| | | | | | Send and Recv HLOs now have an additional required operand which must be token-shaped. XLA client interface for these operations is unchanged and will be updated in follow up CLs. PiperOrigin-RevId: 202993121
* [XLA] Add key-value version of Sort HLO.Gravatar Michael Kuperstein2018-06-29
| | | | | | This is only currently implemented in the evaluator backend, and even that implementation is partial - the key and value type must match. PiperOrigin-RevId: 202673122