diff options
author | Benjamin Kramer <kramerb@google.com> | 2018-05-24 09:50:19 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-24 09:53:02 -0700 |
commit | 7b77cd5e40a9440d9192f907cdb7f798dc6d58c8 (patch) | |
tree | ba4ba424f4764de9cb013172d5a8d2209d2de34c /tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc | |
parent | b947cb1c69177d79a9982a00896321bc8d3767d5 (diff) |
[XLA] Devectorize constant-sized arrays
A sufficiently smart compiler could promote these from heap to stack, in
practice no compiler does that. Remove the superfluous heap allocations
manually.
PiperOrigin-RevId: 197907388
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc b/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc index b06e6c9f3e..cc130a4900 100644 --- a/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc +++ b/tensorflow/compiler/xla/service/hlo_dataflow_analysis.cc @@ -363,7 +363,7 @@ bool HloDataflowAnalysis::UpdateCallValueSet(HloInstruction* call) { bool HloDataflowAnalysis::UpdateConditionalValueSet( HloInstruction* conditional) { CHECK_EQ(conditional->opcode(), HloOpcode::kConditional); - std::vector<const InstructionValueSet*> inputs = { + const InstructionValueSet* const inputs[] = { &GetInstructionValueSet( conditional->true_computation()->root_instruction()), &GetInstructionValueSet( @@ -538,7 +538,7 @@ bool HloDataflowAnalysis::UpdateTupleValueSet(HloInstruction* tuple) { bool HloDataflowAnalysis::UpdateWhileValueSet(HloInstruction* xla_while) { CHECK_EQ(xla_while->opcode(), HloOpcode::kWhile); - std::vector<const InstructionValueSet*> inputs = { + const InstructionValueSet* const inputs[] = { &GetInstructionValueSet(xla_while->while_body()->root_instruction()), &GetInstructionValueSet(xla_while->operand(0))}; if (ssa_form_) { |