Home | History | Annotate | Download | only in service
      1 /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
      2 
      3 Licensed under the Apache License, Version 2.0 (the "License");
      4 you may not use this file except in compliance with the License.
      5 You may obtain a copy of the License at
      6 
      7     http://www.apache.org/licenses/LICENSE-2.0
      8 
      9 Unless required by applicable law or agreed to in writing, software
     10 distributed under the License is distributed on an "AS IS" BASIS,
     11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 See the License for the specific language governing permissions and
     13 limitations under the License.
     14 ==============================================================================*/
     15 
     16 syntax = "proto3";
     17 
     18 package xla;
     19 
     20 option cc_enable_arenas = true;
     21 
     22 // Describes how to pretty-print a profile counter array gathered for a specific
     23 // HloModule.
     24 message 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