Whether this run uses Reflow: the `reflow` config block is set and ZenFlow is not.
(engine: "DeepSpeedEngine")
| 19 | |
| 20 | |
| 21 | def reflow_enabled(engine: "DeepSpeedEngine") -> bool: |
| 22 | """Whether this run uses Reflow: the `reflow` config block is set and ZenFlow is not.""" |
| 23 | if engine._config.zero_config.reflow is None: |
| 24 | return False |
| 25 | # The throughput timer is built before _configure_zenflow runs, so read the flag defensively. |
| 26 | return not getattr(engine, "zenflow", False) |
| 27 | |
| 28 | |
| 29 | def reject_optimizer_without_reflow(engine: "DeepSpeedEngine", optimizer): |
no outgoing calls
no test coverage detected