diff options
author | Justin Lebar <jlebar@google.com> | 2017-09-27 19:46:47 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-27 19:50:38 -0700 |
commit | f972d800ca3accc9af0ad5b9dcabbc5d9b125ab5 (patch) | |
tree | 33c34cbde2ddf02ea70b9ab7b4d71b74f598ea25 /tensorflow/compiler/xla/service/hlo_computation.h | |
parent | da5a5e8d33b6e8ef90295256c5c5b7d8d76909dd (diff) |
[XLA] Replace HloComputation::ReplaceUsesOfInstruction with HloInstruction::ReplaceAllUsesWith.
RAUW used to be *almost* synonymous with RUOI, except RAUW didn't update
the computation's root. This was a dangerous footgun -- if you
accidentally called RAUW when you wanted RUOI (which you almost always
did), your code would work perfectly, except when the relevant node
happened to be the root of a computation.
This change simplifies our APIs so there's just one Right Way To Do It,
by making RAUW update the computation.
PiperOrigin-RevId: 170290230
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_computation.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.h b/tensorflow/compiler/xla/service/hlo_computation.h index 576c44a9f3..ab902312ad 100644 --- a/tensorflow/compiler/xla/service/hlo_computation.h +++ b/tensorflow/compiler/xla/service/hlo_computation.h @@ -106,12 +106,6 @@ class HloComputation { // must have no users. Instruction is deallocated with this call. Status RemoveInstructionAndUnusedOperands(HloInstruction* instruction); - // Replace all uses of "instruction_to_replace" with "instruction". Also, if - // instruction_to_replace is the root of this computation then the root is set - // to "instruction". Does not remove "instruction_to_replace". - Status ReplaceUsesOfInstruction(HloInstruction* instruction_to_replace, - HloInstruction* instruction); - // Set the root of the computation to the given instruction. The instruction // must have already been added to the computation and have the same shape as // the result of the computation for non fusion computations. |