aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_computation.h
diff options
context:
space:
mode:
authorGravatar Sanjoy Das <sanjoy@google.com>2018-07-16 15:46:51 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-16 15:49:40 -0700
commitf4c88d2a1abd043db592ca680bbdda91fa5145a9 (patch)
treebeec95c88719ada98de036b53fffa422f846b1a9 /tensorflow/compiler/xla/service/hlo_computation.h
parentb027ac978f6ed03b634fde2a5ee3fa20d766921e (diff)
Co-allocate call operands with callee parameters
Right now we give these parameters an additional allocation and then don't use it. This is interesting for the CPU backend because we use call instructions to represent fork-join parallelism (i.e. a specially annotated kCall instruction tells the CPU IR emitter to shard the called computation across CPU threads). Moreover, I need this for a principled fix to b/111116907. PiperOrigin-RevId: 204820965
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_computation.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.h b/tensorflow/compiler/xla/service/hlo_computation.h
index abc1da4da3..49ed65910f 100644
--- a/tensorflow/compiler/xla/service/hlo_computation.h
+++ b/tensorflow/compiler/xla/service/hlo_computation.h
@@ -365,6 +365,10 @@ class HloComputation {
unique_id_ = id;
}
+ // Returns the instruction in this computation that has name `name`. Returns
+ // null if there is no such computation.
+ HloInstruction* GetInstructionWithName(tensorflow::StringPiece name);
+
int64 unique_id() const { return unique_id_; }
private: