(module, cast_args=True)
| 48 | _USER_CAST_REGISTRY.add((module, name, utils.maybe_float)) |
| 49 | |
| 50 | def register_float_module(module, cast_args=True): |
| 51 | if not issubclass(module, torch.nn.modules.module.Module): |
| 52 | raise ValueError('{} is not a torch Module'.format(module)) |
| 53 | |
| 54 | if cast_args: |
| 55 | register_float_function(module, 'forward') |
| 56 | |
| 57 | _USER_FLOAT_MODULE.add(module) |
| 58 | |
| 59 | class AmpHandle(object): |
| 60 | def __init__(self, enable_caching=True, verbose=False): |
nothing calls this directly
no test coverage detected