Report a benchmark. Args: iters: (optional) How many iterations were run cpu_time: (optional) Median or mean cpu time in seconds. wall_time: (optional) Median or mean wall time in seconds. throughput: (optional) Throughput (in MB/s) extras: (optional) Dict mapping
(
self,
iters=None,
cpu_time=None,
wall_time=None,
throughput=None,
extras=None,
name=None,
metrics=None)
| 183 | return name |
| 184 | |
| 185 | def report_benchmark( |
| 186 | self, |
| 187 | iters=None, |
| 188 | cpu_time=None, |
| 189 | wall_time=None, |
| 190 | throughput=None, |
| 191 | extras=None, |
| 192 | name=None, |
| 193 | metrics=None): |
| 194 | """Report a benchmark. |
| 195 | |
| 196 | Args: |
| 197 | iters: (optional) How many iterations were run |
| 198 | cpu_time: (optional) Median or mean cpu time in seconds. |
| 199 | wall_time: (optional) Median or mean wall time in seconds. |
| 200 | throughput: (optional) Throughput (in MB/s) |
| 201 | extras: (optional) Dict mapping string keys to additional benchmark info. |
| 202 | Values may be either floats or values that are convertible to strings. |
| 203 | name: (optional) Override the BenchmarkEntry name with `name`. |
| 204 | Otherwise it is inferred from the top-level method name. |
| 205 | metrics: (optional) A list of dict, where each dict has the keys below |
| 206 | name (required), string, metric name |
| 207 | value (required), double, metric value |
| 208 | min_value (optional), double, minimum acceptable metric value |
| 209 | max_value (optional), double, maximum acceptable metric value |
| 210 | """ |
| 211 | name = self._get_name(overwrite_name=name) |
| 212 | _global_report_benchmark( |
| 213 | name=name, iters=iters, cpu_time=cpu_time, wall_time=wall_time, |
| 214 | throughput=throughput, extras=extras, metrics=metrics) |
| 215 | |
| 216 | |
| 217 | @tf_export("test.benchmark_config") |