|
63 | 63 | ), |
64 | 64 | ) |
65 | 65 |
|
| 66 | + |
| 67 | +TORCHAO_MICRO_API_CONFIG = BenchmarkConfig( |
| 68 | + name="Torchao Micro Api Regression", |
| 69 | + id="torchao_micro_api_benchmark", |
| 70 | + source=BenchmarkApiSource( |
| 71 | + api_query_url="https://hud.pytorch.org/api/benchmark/get_time_series", |
| 72 | + type="benchmark_time_series_api", |
| 73 | + api_endpoint_params_template=""" |
| 74 | + { |
| 75 | + "name": "torchao_micro_api_benchmark", |
| 76 | + "query_params": { |
| 77 | + "mode": "", |
| 78 | + "branches": ["main"], |
| 79 | + "repo": "pytorch/ao", |
| 80 | + "device": "", |
| 81 | + "benchmarkName": "micro-benchmark api", |
| 82 | + "startTime": "{{ startTime }}", |
| 83 | + "stopTime": "{{ stopTime }}" |
| 84 | + }, |
| 85 | + "response_formats":["time_series"] |
| 86 | + } |
| 87 | + """, |
| 88 | + ), |
| 89 | + hud_info={ |
| 90 | + "url": "https://hud.pytorch.org/benchmark/v3/dashboard/torchao_micro_api_benchmark", |
| 91 | + }, |
| 92 | + # set baseline from past 4-8 days, and compare with the lastest 4 day |
| 93 | + policy=Policy( |
| 94 | + frequency=Frequency(value=1, unit="days"), |
| 95 | + range=RangeConfig( |
| 96 | + baseline=DayRangeWindow(value=4), |
| 97 | + comparison=DayRangeWindow(value=4), |
| 98 | + ), |
| 99 | + metrics={ |
| 100 | + "bfloat16 fwd time (ms)": RegressionPolicy( |
| 101 | + name="bfloat16 fwd time (ms)", |
| 102 | + condition="less_equal", |
| 103 | + threshold=1.20, |
| 104 | + baseline_aggregation="min", |
| 105 | + ), |
| 106 | + "quantized fwd time (ms)": RegressionPolicy( |
| 107 | + name="quantized fwd time (ms)", |
| 108 | + condition="less_equal", |
| 109 | + threshold=1.20, |
| 110 | + baseline_aggregation="min", |
| 111 | + ), |
| 112 | + "fwd speedup (x)": RegressionPolicy( |
| 113 | + name="fwd speedup (x)", |
| 114 | + condition="greater_equal", |
| 115 | + threshold=0.9, |
| 116 | + baseline_aggregation="median", |
| 117 | + ), |
| 118 | + }, |
| 119 | + notification_config={ |
| 120 | + "type": "github", |
| 121 | + "repo": "pytorch/test-infra", |
| 122 | + "issue": "7477", |
| 123 | + }, |
| 124 | + ), |
| 125 | + report_config=ReportConfig( |
| 126 | + report_level="clear", |
| 127 | + ), |
| 128 | +) |
| 129 | + |
66 | 130 | PYTORCH_OPERATOR_MICROBENCH_CONFIG = BenchmarkConfig( |
67 | 131 | name="Pytorch Operator Microbench Regression", |
68 | 132 | id="pytorch_operator_microbenchmark", |
|
98 | 162 | metrics={ |
99 | 163 | "latency": RegressionPolicy( |
100 | 164 | name="latency", |
101 | | - condition="greater_equal", |
102 | | - threshold=0.85, |
| 165 | + condition="less_equal", |
| 166 | + threshold=1.20, |
103 | 167 | baseline_aggregation="median", |
104 | 168 | ), |
105 | 169 | }, |
|
110 | 174 | }, |
111 | 175 | ), |
112 | 176 | report_config=ReportConfig( |
113 | | - report_level="insufficient_data", |
| 177 | + report_level="regression", |
114 | 178 | ), |
115 | 179 | ) |
116 | 180 |
|
|
199 | 263 | "compiler_regression": COMPILER_BENCHMARK_CONFIG, |
200 | 264 | "pytorch_operator_microbenchmark": PYTORCH_OPERATOR_MICROBENCH_CONFIG, |
201 | 265 | "pytorch_helion": PYTORCH_HELION_CONFIG, |
| 266 | + "torchao_micro_api_benchmark": TORCHAO_MICRO_API_CONFIG, |
202 | 267 | } |
203 | 268 | ) |
204 | 269 |
|
|
0 commit comments