diff options
author | Jonathan Hseu <jhseu@google.com> | 2017-08-25 14:01:05 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-08-25 14:11:12 -0700 |
commit | f6fea18a630cf80d3e78bad4d98533a599936e25 (patch) | |
tree | e50199dcceed004cecc8510f9251f5e04734800f /tensorflow/compiler/xla/service/hlo_computation.h | |
parent | 88e510c479fb96678a8cae07d3f757273a1c8952 (diff) |
Merge changes from github.
END_PUBLIC
---
Commit b30ce4714 authored by James Qin<jamesqin@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Revamp CudnnRNN Saveables
1. Use a lossy way to save/restore cudnn biases during checkpointing.
Cudnn uses 2 biases each gate for all RNNs while tf uses one. To allow cudnn checkpoints
to be compatible with both Cudnn and platform-independent impls, previously both
individual bias and summed biases each gate were stored.
The new way only stores the bias sum for each gate, and split it half-half when
restoring from a cudnn graph. Doing this does not cause problems since RNNs do not use
weight-decay to regularize.
2. Use inheritance instead of branching
* Split RNNParamsSaveable to 1 base class and 4 subclasses.
* Extract common routines and only overwrite rnn-type-specific pieces in subclasses.
PiperOrigin-RevId: 166413989
---
Commit ebc421daf authored by Alan Yee<alyee@ucsd.edu>
Committed by Jonathan Hseu<vomjom@vomjom.net>:
Update documentation for contrib (#12424)
* Update __init__.py
Remove ## for standardization of api docs
* Create README.md
Add README to define this directory's purpose
* Update __init.py
Markdown styling does not show up well in api docs
* Update README.md
Add short mention of describing what to deprecate
* Update README.md
Capitalize title
* Update README.md
Revert README change
* Delete README.md
---
Commit fd295394d authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Use latest version of nsync library, which now allows use of cmake on MacOS.
PiperOrigin-RevId: 166411437
---
Commit 587d728e0 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA] Refactor reduce-precision-insertion filters, add several more options.
In particular, this adds the ability to add reduce-precision operations after fusion nodes based on the contents of those fusion nodes, and the ability to filter operations based on the "op_name" metadata.
PiperOrigin-RevId: 166408392
---
Commit 3142f8ef5 authored by Ali Yahya<alive@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Steps toward making ResourceVariables compatible with Eager.
This change forces the value of the reuse flag in variable scopes to be tf.AUTO_REUSE when in Eager mode.
This change also adds comprehensive Eager tests for ResourceVariable.
PiperOrigin-RevId: 166408161
---
Commit b2ce45150 authored by Igor Ganichev<iga@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Make Graph::IsValidNode public
It can be reimplemented with existing public APIs, but instead of doing so,
making this one public seems better.
PiperOrigin-RevId: 166407897
---
Commit 0a2f40e92 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
[XLA::CPU] Fix HLO profiling in parallel CPU backend.
PiperOrigin-RevId: 166400211
---
Commit c4a58e3fd authored by Yao Zhang<yaozhang@google.com>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
Identify frame ids for all nodes in a graph.
PiperOrigin-RevId: 166397615
---
Commit 989713f26 authored by A. Unique TensorFlower<gardener@tensorflow.org>
Committed by TensorFlower Gardener<gardener@tensorflow.org>:
BEGIN_PUBLIC
Automated g4 rollback of changelist 166294015
PiperOrigin-RevId: 166521502
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_computation.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.h b/tensorflow/compiler/xla/service/hlo_computation.h index f383a17fb8..0a33d0c1cf 100644 --- a/tensorflow/compiler/xla/service/hlo_computation.h +++ b/tensorflow/compiler/xla/service/hlo_computation.h @@ -31,7 +31,6 @@ limitations under the License. #include "tensorflow/compiler/xla/service/hlo_instruction.h" #include "tensorflow/compiler/xla/service/hlo_reachability.h" #include "tensorflow/compiler/xla/service/name_uniquer.h" -#include "tensorflow/compiler/xla/shape_tree.h" #include "tensorflow/compiler/xla/statusor.h" #include "tensorflow/compiler/xla/types.h" #include "tensorflow/compiler/xla/xla_data.pb.h" @@ -126,8 +125,7 @@ class HloComputation { // Returns the parameter instruction for the given parameter number. HloInstruction* parameter_instruction(int64 param_no) const { CHECK_GE(param_no, 0); - CHECK_LT(param_no, static_cast<int64>(param_instructions_.size())) - << "Computation " << name() << " has no parameter number " << param_no; + CHECK_LT(param_no, static_cast<int64>(param_instructions_.size())); return param_instructions_[param_no]; } @@ -201,16 +199,8 @@ class HloComputation { // producing the copied result. All instructions performing the copy are added // to the computation. For array-shaped values, this method trivially returns // a kCopy instruction. For tuple-shaped instructions, the copy is performed - // with a series of kGetTupleElement and kTuple instructions. If - // indices_to_copy is non-null then this ShapeTree indicates which elements - // (arrays) of the shape to copy. Non-copied elements are passed through - // transparently. If copies_added is non-null, then the added kCopy - // instructions will be inserted in the respective index in the given - // ShapeTree. - StatusOr<HloInstruction*> DeepCopyInstruction( - HloInstruction* instruction, - const ShapeTree<bool>* indices_to_copy = nullptr, - ShapeTree<HloInstruction*>* copies_added = nullptr); + // with a series of kGetTupleElement and kTuple instructions. + StatusOr<HloInstruction*> DeepCopyInstruction(HloInstruction* instruction); // Computes and returns the ProgramShape of this computation (shape of // parameters and result without layout). @@ -297,11 +287,9 @@ class HloComputation { tensorflow::gtl::ArraySlice<HloInstruction*> instructions_to_fuse, HloInstruction* fusion_instruction); - // Internal helper for recursive copying of an instruction. Creates and - // returns a deep copy of the given instruction. - StatusOr<HloInstruction*> DeepCopyHelper( - HloInstruction* instruction, const ShapeTree<bool>* indices_to_copy, - ShapeTree<HloInstruction*>* copies_added, ShapeIndex* index); + // Internal helper for copying a tuple value. Creates and returns a deep copy + // of the given instruction. The given instruction must be tuple-shaped. + StatusOr<HloInstruction*> DeepCopyTuple(HloInstruction* instruction); // Internal helper to collect unreachable roots. std::vector<HloInstruction*> CollectUnreachableRoots() const; |