diff options
author | Bjarke Hammersholt Roune <broune@google.com> | 2017-07-31 18:48:42 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-07-31 18:52:42 -0700 |
commit | b882d686ff00f73425a846c47e29a7c336435f25 (patch) | |
tree | 65ce9501716aac37d9bb26bc58960ed64b19b4ef /tensorflow/compiler/xla/service/hlo_execution_profile.cc | |
parent | 14b73676136f6044ae372513e56189b5528a3b6e (diff) |
Allow cost estimates to differ per backend and include the estimates into the HLO profile. Add a summary table for what categories have the most opportunity for optimization left in them.
PiperOrigin-RevId: 163780413
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_execution_profile.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_execution_profile.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_execution_profile.cc b/tensorflow/compiler/xla/service/hlo_execution_profile.cc index 7a83a92404..654565ab17 100644 --- a/tensorflow/compiler/xla/service/hlo_execution_profile.cc +++ b/tensorflow/compiler/xla/service/hlo_execution_profile.cc @@ -44,10 +44,9 @@ uint64 HloExecutionProfile::GetProfileResult(const HloInstruction& hlo) const { string HloExecutionProfile::ToString( const HloComputation& computation, const DeviceDescription& device_description, - const HloCostAnalysis::ShapeSizeFunction& shape_size) const { - HloCostAnalysis cost_analysis(shape_size); + HloCostAnalysis* cost_analysis) const { tensorflow::Status analysis_status = - computation.root_instruction()->Accept(&cost_analysis); + computation.root_instruction()->Accept(cost_analysis); if (!analysis_status.ok()) { return ""; } @@ -61,8 +60,9 @@ string HloExecutionProfile::ToString( builder.AddOp(/*op_name=*/hlo->ToString(), /*short_name=*/hlo->ToString(/*compact_operands=*/true), - hlo->ToCategory(), cycles, cost_analysis.flop_count(*hlo), - cost_analysis.bytes_accessed(*hlo)); + hlo->ToCategory(), cycles, cost_analysis->flop_count(*hlo), + cost_analysis->bytes_accessed(*hlo), + cost_analysis->seconds(*hlo)); } return builder.ToString(); } |