|
1 | 1 | # MLPerf Inference - Speech Recognition |
2 | 2 |
|
3 | | -Below we give an _essential_ sequence of steps that should result in a successful setup |
| 3 | +Below we give an _essential_ sequence of steps that should result in a successful setup |
4 | 4 | of the RNN-T workflow on Linux systems. |
5 | 5 |
|
6 | 6 | The steps are extracted from a [minimalistic Amazon Linux |
@@ -58,6 +58,9 @@ of Docker images for this workflow including Ubuntu, Debian and CentOS. |
58 | 58 | 1. Detect [Python](#detect_python) |
59 | 59 | 1. Install [Python dependencies](#install_python_deps) |
60 | 60 | 1. Install a branch of the [MLPerf Inference](#install_inference_repo) repo |
| 61 | +1. [Usage](#usage) |
| 62 | + 1. [Performance](#usage_performance) |
| 63 | + 1. [Accuracy](#usage_performance) |
61 | 64 |
|
62 | 65 | <a name="install"></a> |
63 | 66 | ## Installation |
@@ -177,3 +180,118 @@ $ ck install package --tags=python-package,absl |
177 | 180 | $ ck install package --tags=mlperf,inference,source,dividiti.rnnt |
178 | 181 | ``` |
179 | 182 | **NB:** This source will be used for building LoadGen as well. |
| 183 | + |
| 184 | + |
| 185 | +<a name="usage"></a> |
| 186 | +## Usage |
| 187 | + |
| 188 | +<a name="usage_performance"></a> |
| 189 | +### Running a performance test |
| 190 | + |
| 191 | +The first run will end up resolving all the remaining explicit dependencies: |
| 192 | +- preprocessing the LibriSpeech Dev-Clean dataset to wav; |
| 193 | +- building the LoadGen API; |
| 194 | +- downloading the PyTorch model. |
| 195 | + |
| 196 | +It's a performance run which should print something like: |
| 197 | +``` |
| 198 | +$ ck run program:speech-recognition-pytorch-loadgen --cmd_key=performance --skip_print_timers |
| 199 | +... |
| 200 | +Dataset loaded with 4.36 hours. Filtered 1.02 hours. Number of samples: 2513 |
| 201 | +Running Loadgen test... |
| 202 | +Average latency (ms) per query: |
| 203 | +7335.167247106061 |
| 204 | +Median latency (ms): |
| 205 | +7391.662108 |
| 206 | +90 percentile latency (ms): |
| 207 | +13347.925176 |
| 208 | +================================================ |
| 209 | +MLPerf Results Summary |
| 210 | +================================================ |
| 211 | +SUT name : PySUT |
| 212 | +Scenario : Offline |
| 213 | +Mode : Performance |
| 214 | +Samples per second: 4.63626 |
| 215 | +Result is : INVALID |
| 216 | + Min duration satisfied : NO |
| 217 | + Min queries satisfied : Yes |
| 218 | +Recommendations: |
| 219 | + * Increase expected QPS so the loadgen pre-generates a larger (coalesced) query. |
| 220 | +
|
| 221 | +================================================ |
| 222 | +Additional Stats |
| 223 | +================================================ |
| 224 | +Min latency (ns) : 278432559 |
| 225 | +Max latency (ns) : 14235613054 |
| 226 | +Mean latency (ns) : 7335167247 |
| 227 | +50.00 percentile latency (ns) : 7521181269 |
| 228 | +90.00 percentile latency (ns) : 13402430910 |
| 229 | +95.00 percentile latency (ns) : 13723706550 |
| 230 | +97.00 percentile latency (ns) : 14054764438 |
| 231 | +99.00 percentile latency (ns) : 14235613054 |
| 232 | +99.90 percentile latency (ns) : 14235613054 |
| 233 | +
|
| 234 | +================================================ |
| 235 | +Test Parameters Used |
| 236 | +================================================ |
| 237 | +samples_per_query : 66 |
| 238 | +target_qps : 1 |
| 239 | +target_latency (ns): 0 |
| 240 | +max_async_queries : 1 |
| 241 | +min_duration (ms): 60000 |
| 242 | +max_duration (ms): 0 |
| 243 | +min_query_count : 1 |
| 244 | +max_query_count : 0 |
| 245 | +qsl_rng_seed : 3133965575612453542 |
| 246 | +sample_index_rng_seed : 665484352860916858 |
| 247 | +schedule_rng_seed : 3622009729038561421 |
| 248 | +accuracy_log_rng_seed : 0 |
| 249 | +accuracy_log_probability : 0 |
| 250 | +print_timestamps : false |
| 251 | +performance_issue_unique : false |
| 252 | +performance_issue_same : false |
| 253 | +performance_issue_same_index : 0 |
| 254 | +performance_sample_count : 2513 |
| 255 | +
|
| 256 | +No warnings encountered during test. |
| 257 | +
|
| 258 | +No errors encountered during test. |
| 259 | +Done! |
| 260 | +
|
| 261 | +Execution time: 38.735 sec. |
| 262 | +``` |
| 263 | + |
| 264 | +The above output is the contents of `mlperf_log_summary.txt`, one of the log files generated by LoadGen. All LoadGen log files can be located in the program's temporary directory: |
| 265 | +```bash |
| 266 | +$ cd `ck find program:speech-recognition-pytorch-loadgen`/tmp && ls -la mlperf_log_* |
| 267 | +-rw-r--r-- 1 anton eng 4 Jul 3 18:06 mlperf_log_accuracy.json |
| 268 | +-rw-r--r-- 1 anton eng 20289 Jul 3 18:06 mlperf_log_detail.txt |
| 269 | +-rw-r--r-- 1 anton eng 1603 Jul 3 18:06 mlperf_log_summary.txt |
| 270 | +-rw-r--r-- 1 anton eng 860442 Jul 3 18:06 mlperf_log_trace.json |
| 271 | +``` |
| 272 | + |
| 273 | +<a name="usage_accuracy"></a> |
| 274 | +### Running an accuracy test |
| 275 | + |
| 276 | +``` |
| 277 | +$ ck run program:speech-recognition-pytorch-loadgen --cmd_key=accuracy --skip_print_timers |
| 278 | +... |
| 279 | +Dataset loaded with 4.36 hours. Filtered 1.02 hours. Number of samples: 2513 |
| 280 | +Running Loadgen test... |
| 281 | +
|
| 282 | +No warnings encountered during test. |
| 283 | +
|
| 284 | +No errors encountered during test. |
| 285 | +Running accuracy script: /usr/bin/python3 /disk1/homes/anton/CK-TOOLS/mlperf-inference-dividiti.rnnt/inference/v0.7/speech_recognition/rnnt/accuracy_eval.py --log_dir /disk1/homes/anton/CK/ck-mlperf/program/speech-recognition-pytorch-loadgen/tmp --dataset_dir /homes/anton/CK-TOOLS/dataset-librispeech-preprocessed-to-wav-dev-clean/../ --manifest /homes/anton/CK-TOOLS/dataset-librispeech-preprocessed-to-wav-dev-clean/wav-list.json |
| 286 | +Dataset loaded with 4.36 hours. Filtered 1.02 hours. Number of samples: 2513 |
| 287 | +Word Error Rate: 0.07452253714852645 |
| 288 | +Done! |
| 289 | +
|
| 290 | +Execution time: 502.197 sec. |
| 291 | +
|
| 292 | +$ cd `ck find program:speech-recognition-pytorch-loadgen`/tmp && ls -la mlperf_log_* |
| 293 | +-rw-r--r-- 1 anton eng 3862427 Jul 3 18:00 mlperf_log_accuracy.json |
| 294 | +-rw-r--r-- 1 anton eng 20126 Jul 3 18:00 mlperf_log_detail.txt |
| 295 | +-rw-r--r-- 1 anton eng 74 Jul 3 18:00 mlperf_log_summary.txt |
| 296 | +-rw-r--r-- 1 anton eng 29738248 Jul 3 18:00 mlperf_log_trace.json |
| 297 | +``` |
0 commit comments