(func)
| 48 | |
| 49 | |
| 50 | def lazy_disable(func): |
| 51 | # torch._disable_dynamo imports torch._dynamo on the first call instead of when decorating, so decorating at |
| 52 | # import time does not slow down import deepspeed. It caches the disabled function from torch 2.4. |
| 53 | if required_torch_version(min_version=2.4): |
| 54 | return torch._disable_dynamo(func) |
| 55 | return disable(func) |
| 56 | |
| 57 | |
| 58 | def enable(min_version=None): |
nothing calls this directly
no test coverage detected