diff options
author | Eli Bendersky <eliben@google.com> | 2017-06-27 09:02:54 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-06-27 09:10:04 -0700 |
commit | 521188ffa54470cef0a780aac19f551137e5090a (patch) | |
tree | 95f62956ddcea54617fa0a53392ecb8fe3941713 /tensorflow/compiler/xla/service/hlo_pass_pipeline.cc | |
parent | ba8ffba212a4375c000fe670d5e5b5e0330312ad (diff) |
[XLA] Remove the "hlo dumper" parameter of xla::Compiler and its piping.
This dumper is no longer necessary since the restructuring of HLO dumping and
the addition of MaybeDumpHloModule which heeds to the right flags. The
remaining bits didn't have additional functionality, but constituted a lot of
boilerplate that has to be propagated throughout the backends.
PiperOrigin-RevId: 160281798
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_pass_pipeline.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_pass_pipeline.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_pass_pipeline.cc b/tensorflow/compiler/xla/service/hlo_pass_pipeline.cc index 119e2d7902..4b824f8240 100644 --- a/tensorflow/compiler/xla/service/hlo_pass_pipeline.cc +++ b/tensorflow/compiler/xla/service/hlo_pass_pipeline.cc @@ -17,6 +17,7 @@ limitations under the License. #include <functional> +#include "tensorflow/compiler/xla/service/hlo_graph_dumper.h" #include "tensorflow/compiler/xla/status_macros.h" #include "tensorflow/compiler/xla/types.h" #include "tensorflow/compiler/xla/util.h" @@ -30,9 +31,10 @@ using ::tensorflow::strings::StrAppend; namespace xla { namespace { -void DumpModule(const Compiler::HloDumper& dumper_, const HloModule& module, +void DumpModule(const HloModule& module, + const string& message) { - dumper_(module, message); + hlo_graph_dumper::MaybeDumpHloModule(module, message); VLOG(2) << "HLO " << message << ":"; XLA_VLOG_LINES(2, module.ToString()); } @@ -75,7 +77,7 @@ StatusOr<bool> HloPassPipeline::Run(HloModule* module) { // Emit label containing: "after foo-pass, before bar-pass". message.clear(); StrAppend(&message, prefix, ", before ", pass->name()); - DumpModule(dumper_, *module, message); + DumpModule(*module, message); TF_RETURN_IF_ERROR(run_invariant_checkers()); TF_ASSIGN_OR_RETURN(bool changed_this_pass, pass->Run(module)); @@ -85,7 +87,7 @@ StatusOr<bool> HloPassPipeline::Run(HloModule* module) { StrAppend(&prefix, name(), ": after ", pass->name()); } TF_RETURN_IF_ERROR(run_invariant_checkers()); - DumpModule(dumper_, *module, prefix + ", pipeline end"); + DumpModule(*module, prefix + ", pipeline end"); return changed; } |