1/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 2 3Licensed under the Apache License, Version 2.0 (the "License"); 4you may not use this file except in compliance with the License. 5You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9Unless required by applicable law or agreed to in writing, software 10distributed under the License is distributed on an "AS IS" BASIS, 11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12See the License for the specific language governing permissions and 13limitations under the License. 14==============================================================================*/ 15 16syntax = "proto3"; 17 18package xla; 19 20option cc_enable_arenas = true; 21 22// Describes how to pretty-print a profile counter array gathered for a specific 23// HloModule. 24message HloProfilePrinterData { 25 // Pretty-printer information about an HloInstruction. 26 message HloInstructionInfo { 27 string long_name = 1; 28 string short_name = 2; 29 string category = 3; 30 31 // Metrics computed by HloCostAnalysis. 32 float flop_count = 4; 33 float transcendental_count = 5; 34 float bytes_accessed = 6; 35 float optimal_seconds = 7; 36 37 // The index into the profile counters array for the HloInstruction 38 // corresponding to this HloInstructionInfo. 39 int64 profile_index = 8; 40 } 41 42 // Pretty-printer information about an HloComputation. 43 message HloComputationInfo { 44 string name = 1; 45 46 // The index into the profile counters array for the HloComputation 47 // corresponding to this HloComputationInfo. 48 int64 profile_index = 2; 49 50 // HloInstructionInfos for every HloInstruction in the HloComputation for 51 // corresponding to this HloComputattionInfo. 52 repeated HloInstructionInfo instruction_infos = 3; 53 } 54 55 // HloComputationInfos for every HloComputation in the HloModule. 56 repeated HloComputationInfo computation_infos = 1; 57 58 // The size of the profile counters array we will pretty-print. 59 int64 profile_counters_size = 2; 60 61 // Maps extra metric name to the index into the profile counters array. 62 map<string, int64> extra_metrics = 3; 63 64 // Name of the entry computation. 65 string entry_computation = 4; 66} 67