import torch def torch_autocast(device_type="cuda", **kwargs): return torch.amp.autocast(device_type=device_type, **kwargs)