[XLA] Fix forward for HLO profiling test, explicitly set profiling preference.
authorChris Leary <leary@google.com>
Fri, 16 Mar 2018 22:13:25 +0000 (15:13 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 16 Mar 2018 22:19:55 +0000 (15:19 -0700)
PiperOrigin-RevId: 189400869

tensorflow/compiler/xla/service/hlo_execution_profile.cc
tensorflow/compiler/xla/tests/xla_hlo_profile_test.cc

index f0df93b..c3ccbf0 100644 (file)
@@ -111,8 +111,8 @@ HloExecutionProfile::HloExecutionProfile(
     : hlo_profile_printer_data_(*hlo_profile_printer_data),
       hlo_profile_index_map_(*hlo_profile_index_map),
       profile_counters_(
-          /*count*/ hlo_profile_index_map_.total_count(),
-          /*value*/ 0) {}
+          /*count=*/hlo_profile_index_map_.total_count(),
+          /*value=*/0) {}
 
 void HloExecutionProfile::SetCyclesTakenBy(const HloInstruction* hlo,
                                            uint64 cycles_taken) {
index 9ad2a19..24b9f37 100644 (file)
@@ -144,7 +144,7 @@ void ExecuteAndFetchProfile(string* profile_output, LocalClient* client,
   TF_ASSERT_OK_AND_ASSIGN(
       std::unique_ptr<LocalExecutable> local_executable,
       client->Compile(computation, {&lhs_arg_shape, &rhs_arg_shape},
-                      ExecutableBuildOptions()));
+                      ExecutableBuildOptions().set_hlo_profile(true)));
 
   Executable* executable = local_executable->executable();
   HloExecutionProfile hlo_execution_profile(