Disable All Megatron Timing with FakeTimers
| 213 | |
| 214 | |
| 215 | class FakeTimers: |
| 216 | """Disable All Megatron Timing with FakeTimers""" |
| 217 | |
| 218 | def __init__(self): |
| 219 | from megatron.timers import DummyTimer |
| 220 | self.dummy_timer = DummyTimer() |
| 221 | |
| 222 | def __call__(self, *args: Any, **kwds: Any) -> Any: |
| 223 | return self.dummy_timer |
| 224 | |
| 225 | |
| 226 | def offload_megatron_param_and_grad(module_list: nn.ModuleList, offload_grad=False, hybrid_engine=None): |
no outgoing calls
no test coverage detected