(*args, **kwargs)
| 131 | |
| 132 | def autocast(f, enabled=True): |
| 133 | def do_autocast(*args, **kwargs): |
| 134 | with torch.cuda.amp.autocast( |
| 135 | enabled=enabled, |
| 136 | dtype=torch.get_autocast_gpu_dtype(), |
| 137 | cache_enabled=torch.is_autocast_cache_enabled(), |
| 138 | ): |
| 139 | return f(*args, **kwargs) |
| 140 | |
| 141 | return do_autocast |
| 142 |
nothing calls this directly
no outgoing calls
no test coverage detected