Produces the list of enabled static optimizations.
(self)
| 2361 | "explicitly whitelisting stateful ops by specifying them in this list.") |
| 2362 | |
| 2363 | def _static_optimizations(self): |
| 2364 | """Produces the list of enabled static optimizations.""" |
| 2365 | |
| 2366 | result = [] |
| 2367 | result.extend(self.experimental_optimization._static_optimizations()) # pylint: disable=protected-access |
| 2368 | |
| 2369 | if self.experimental_deterministic is False: |
| 2370 | result.append("make_sloppy") |
| 2371 | if self.experimental_stats and self.experimental_stats.latency_all_edges: |
| 2372 | result.append("latency_all_edges") |
| 2373 | if (self.experimental_slack and |
| 2374 | self.experimental_optimization.prefetch_to_device is None): |
| 2375 | result.append("slack") |
| 2376 | if (self.experimental_distribute and |
| 2377 | self.experimental_distribute._make_stateless): # pylint: disable=protected-access |
| 2378 | result.append("make_stateless") |
| 2379 | return result |
| 2380 | |
| 2381 | def _static_optimization_configs(self): |
| 2382 | """Produces the list of configurations for enabled static optimizations.""" |