(f, enabled=True)
| 138 | |
| 139 | |
| 140 | def autocast(f, enabled=True): |
| 141 | def do_autocast(*args, **kwargs): |
| 142 | with torch.cuda.amp.autocast( |
| 143 | enabled=enabled, |
| 144 | dtype=torch.get_autocast_gpu_dtype(), |
| 145 | cache_enabled=torch.is_autocast_cache_enabled(), |
| 146 | ): |
| 147 | return f(*args, **kwargs) |
| 148 | |
| 149 | return do_autocast |
| 150 | |
| 151 | |
| 152 | def load_partial_from_config(config): |
nothing calls this directly
no outgoing calls
no test coverage detected