• 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    }
47
48    int64 buffer_address = 13;
49  }
50
51  message ConvKey {
52    int64 algorithm = 1;
53    bool tensor_ops_enabled = 2;
54  }
55
56  message GemmKey {
57    int64 algorithm = 1;
58  }
59
60  int64 scratch_bytes = 8;
61  google.protobuf.Duration run_time = 9;
62
63  FailureResult failure = 7;
64
65  oneof key {
66    ConvKey conv = 5;
67    GemmKey gemm = 6;
68  }
69
70  // Next ID: 14
71}
72
73message AutotuningLog {
74  google.protobuf.Any instr = 1;
75
76  // Records all auto-tuning results per algorithm.
77  repeated AutotuneResult results = 2;
78
79  CudnnVersion cudnn_version = 3;
80  ComputeCapability compute_capability = 4;
81
82  // stream_executor::DeviceDescription::pci_bus_id.
83  string device_pci_bus_id = 5;
84
85  string blas_version = 6;
86
87  // Next ID: 7
88}
89