diff options
author | Kay Zhu <kayzhu@google.com> | 2018-02-07 14:51:03 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-02-07 14:54:38 -0800 |
commit | bbc4edea4c12485894b9f38931694080a805a47f (patch) | |
tree | a3a8e32a2a51cc211fdbc01e736e3c5d17851282 /tensorflow/compiler/xla/service/interpreter | |
parent | d90054e7c0f41f4bab81df0548577a73b939a87a (diff) |
[XLA] Keep the number of HloPasses minimum for the interpreter backend.
This would be useful to identify bugs for these HLO passes.
PiperOrigin-RevId: 184900236
Diffstat (limited to 'tensorflow/compiler/xla/service/interpreter')
-rw-r--r-- | tensorflow/compiler/xla/service/interpreter/compiler.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tensorflow/compiler/xla/service/interpreter/compiler.cc b/tensorflow/compiler/xla/service/interpreter/compiler.cc index c83880e030..9171e859c6 100644 --- a/tensorflow/compiler/xla/service/interpreter/compiler.cc +++ b/tensorflow/compiler/xla/service/interpreter/compiler.cc @@ -44,28 +44,12 @@ namespace interpreter { namespace se = ::perftools::gputools; namespace sep = ::perftools::gputools::interpreter; -/* - * Run optimization passes on the module. The graph is transformed by - * each pass in the optimization pipeline. The service subdirectory - * contains useful optimization passes. - */ Status InterpreterCompiler::RunHloOptimization(HloModule* hlo_module) { HloPassPipeline pipeline("Interpreter"); - pipeline.AddPass<Inliner>(); - pipeline.AddPass<HloSubcomputationUnification>(); - pipeline.AddPass<HloCSE>(false); - - pipeline.AddPass<HloPassFix<AlgebraicSimplifier>>( - false, [](const Shape&, const Shape&) { return false; }); - pipeline.AddPass<WhileLoopSimplifier>(); - pipeline.AddPass<ReshapeMover>(); - pipeline.AddPass<HloConstantFolding>(); - pipeline.AddPass<HloCSE>(true); + pipeline.AddPass<LayoutAssignment>( hlo_module->mutable_entry_computation_layout()); - pipeline.AddPass<HloDCE>(); - pipeline.AddPass<FlattenCallGraph>(); return pipeline.Run(hlo_module).status(); } |