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"; 12import "tensorflow/compiler/xla/stream_executor/dnn.proto"; 13 14option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; 15 16message CudnnVersion { 17 int32 major = 1; 18 int32 minor = 2; 19 int32 patch = 3; 20} 21 22message ComputeCapability { 23 int32 major = 1; 24 int32 minor = 2; 25} 26 27message AutotuneResult { 28 enum FailureKind { 29 UNKNOWN = 0; 30 31 // Algorithm wrote memory outside its output buffers. 32 REDZONE_MODIFIED = 1; 33 34 // Algorithm gave a different result from a reference algorithm. 35 WRONG_RESULT = 2; 36 37 // Algorithm was rejected for failing to run or for known bugs. 38 DISQUALIFIED = 3; 39 } 40 41 message FailureResult { 42 FailureKind kind = 1; 43 string msg = 2; 44 45 // For failure_kind == WRONG_RESULT, this field indicates the reference 46 // configuration that we compared against. 47 // 48 // Note that the reference algorithm isn't always correct. However, 49 // empirically it's more correct, as it's "algo 0", less fancy than the 50 // compared one. 51 oneof key { 52 ConvKey reference_conv = 11; 53 GemmKey reference_gemm = 12; 54 CudaConvPlanKey reference_cuda_conv_plan = 14; 55 stream_executor.dnn.AlgorithmProto reference_algorithm = 15; 56 } 57 58 int64 buffer_address = 13; 59 } 60 61 // Legacy and unused in new data; superseded by AlgorithmProto. 62 message ConvKey { 63 int64 algorithm = 1; 64 bool tensor_ops_enabled = 2; 65 } 66 67 message GemmKey { 68 int64 algorithm = 1; 69 } 70 71 // Legacy and unused in new data; superseded by AlgorithmProto. 72 message CudaConvPlanKey { 73 string exec_plan_id = 1; 74 } 75 76 int64 scratch_bytes = 8; 77 google.protobuf.Duration run_time = 9; 78 79 FailureResult failure = 7; 80 81 oneof key { 82 ConvKey conv = 5; 83 GemmKey gemm = 6; 84 CudaConvPlanKey cuda_conv_plan = 15; 85 stream_executor.dnn.AlgorithmProto algorithm = 16; 86 } 87 88 // Next ID: 17 89} 90 91message AutotuningLog { 92 google.protobuf.Any instr = 1; 93 94 // Records all auto-tuning results per algorithm. 95 repeated AutotuneResult results = 2; 96 97 CudnnVersion cudnn_version = 3; 98 ComputeCapability compute_capability = 4; 99 100 // stream_executor::DeviceDescription::pci_bus_id. 101 string device_pci_bus_id = 5; 102 103 string blas_version = 6; 104 105 // Next ID: 7 106} 107