• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This file defines protos that store the results of autotuning various
2// operations.
3//
4// They are in proto format because we want to log them structured. They offer
5// tremendous statistical, testing, and debugging value.
6syntax = "proto3";
7
8package tensorflow;
9
10import "google/protobuf/any.proto";
11import "google/protobuf/duration.proto";
12
13option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
14
15message CudnnVersion {
16  int32 major = 1;
17  int32 minor = 2;
18  int32 patch = 3;
19}
20
21message ComputeCapability {
22  int32 major = 1;
23  int32 minor = 2;
24}
25
26message AutotuneResult {
27  enum FailureKind {
28    UNKNOWN = 0;
29    REDZONE_MODIFIED = 1;
30    WRONG_RESULT = 2;
31  }
32
33  message FailureResult {
34    FailureKind kind = 1;
35    string msg = 2;
36
37    // For failure_kind == WRONG_RESULT, this field indicates the reference
38    // configuration that we compared against.
39    //
40    // Note that the reference algorithm isn't always correct.  However,
41    // empirically it's more correct, as it's "algo 0", less fancy than the
42    // compared one.
43    oneof key {
44      ConvKey reference_conv = 11;
45      GemmKey reference_gemm = 12;
46      CudaConvPlanKey reference_cuda_conv_plan = 14;
47    }
48
49    int64 buffer_address = 13;
50  }
51
52  message ConvKey {
53    int64 algorithm = 1;
54    bool tensor_ops_enabled = 2;
55  }
56
57  message GemmKey {
58    int64 algorithm = 1;
59  }
60
61  message CudaConvPlanKey {
62    string exec_plan_id = 1;
63  }
64
65  int64 scratch_bytes = 8;
66  google.protobuf.Duration run_time = 9;
67
68  FailureResult failure = 7;
69
70  oneof key {
71    ConvKey conv = 5;
72    GemmKey gemm = 6;
73    CudaConvPlanKey cuda_conv_plan = 15;
74  }
75
76  // Next ID: 16
77}
78
79message AutotuningLog {
80  google.protobuf.Any instr = 1;
81
82  // Records all auto-tuning results per algorithm.
83  repeated AutotuneResult results = 2;
84
85  CudnnVersion cudnn_version = 3;
86  ComputeCapability compute_capability = 4;
87
88  // stream_executor::DeviceDescription::pci_bus_id.
89  string device_pci_bus_id = 5;
90
91  string blas_version = 6;
92
93  // Next ID: 7
94}
95