| syntax = "proto3"; |
| |
| package chrome.ml_benchmark; |
| |
| enum AccelerationMode { |
| NO_ACCELERATION = 0; |
| NNAPI = 1; |
| } |
| |
| // For details on what each of the fields do |
| // Refer to the CrOS ML Benchmarking Suite Design Document |
| // at go/cros-ml-benchmark-suite |
| message CrOSBenchmarkConfig { |
| reserved 2, 3; |
| |
| AccelerationMode acceleration_mode = 1; |
| |
| // String representation of the driver proto configuration, to be decoded by |
| // the benchmark driver implementation. |
| string driver_config = 4; |
| } |
| |
| enum BenchmarkReturnStatus { |
| OK = 0; |
| INCORRECT_CONFIGURATION = 1; |
| INITIALIZATION_FAILED = 2; |
| BENCHMARK_TIMED_OUT = 3; |
| RUNTIME_ERROR = 4; |
| } |
| |
| message Metric { |
| enum Direction { |
| SMALLER_IS_BETTER = 0; |
| BIGGER_IS_BETTER = 1; |
| } |
| |
| // https://crbug.com/1047454#c7 |
| // Same units as in |tast/common/perf/perf.go|. |
| enum Units { |
| UNITLESS = 0; |
| BYTES = 1; |
| JOULES = 2; |
| WATTS = 3; |
| COUNT = 4; |
| MS = 5; |
| NPERCENT = 6; |
| SIGMA = 7; |
| TS_MS = 8; |
| } |
| |
| // Adds a check that there's only a single value in |values| |
| // if |cardinality| == |SINGLE|. |
| enum Cardinality { |
| SINGLE = 0; |
| MULTIPLE = 1; |
| } |
| |
| // |name| is prefixed by the scenario name and passed to the Crosbolt. |
| string name = 1; |
| Units units = 2; |
| Direction direction = 3; |
| Cardinality cardinality = 4; |
| repeated double values = 5 [packed = true]; |
| } |
| |
| message BenchmarkResults { |
| BenchmarkReturnStatus status = 1; |
| string results_message = 2; |
| // accuracy of inference |
| float total_accuracy = 3; |
| // originally, test drivers only outputs the average latency |
| // This has been modified to output latencies at different percentiles |
| int64 average_latency_in_us = 4 [deprecated = true]; |
| // For new code, use this instead, which allows us to output 50th and 90th |
| // Percentile latencies |
| map<int32, int64> percentile_latencies_in_us = 5; |
| |
| repeated Metric metrics = 6; |
| } |