diff --git a/tensorflow/compiler/xla/service/cpu/cpu_compiler.cc b/tensorflow/compiler/xla/service/cpu/cpu_compiler.cc index 06e7ec0c7cb..99b5035c2db 100644 --- a/tensorflow/compiler/xla/service/cpu/cpu_compiler.cc +++ b/tensorflow/compiler/xla/service/cpu/cpu_compiler.cc @@ -757,8 +757,14 @@ CpuCompiler::CompileAheadOfTime(std::vector> modules, HloModule* module = modules[i].get(); VLOG(1) << "Compiling ahead-of-time: " << module->name(); + VLOG(2) << "Before optimization:"; + XLA_VLOG_LINES(2, module->ToString()); + TF_RETURN_IF_ERROR(RunHloPasses(module, /*is_aot_compile=*/true)); + VLOG(2) << "After optimization:"; + XLA_VLOG_LINES(2, module->ToString()); + TF_ASSIGN_OR_RETURN( SequentialHloOrdering::HloModuleSequence module_sequence, CreateMemoryMinimizingSequence(*module, BufferSizeBytesFunction()));