(*args, **kwargs)
| 86 | |
| 87 | def _cpu_override(orig_fn): |
| 88 | def wrapper(*args, **kwargs): |
| 89 | dev = kwargs.get("device") |
| 90 | if isinstance(dev, str) and "cuda" in dev: |
| 91 | kwargs["device"] = "cpu" |
| 92 | elif isinstance(dev, torch.device) and dev.type == "cuda": |
| 93 | kwargs["device"] = "cpu" |
| 94 | return orig_fn(*args, **kwargs) |
| 95 | return wrapper |
| 96 | |
| 97 | _orig_arange = torch.arange |
nothing calls this directly
no outgoing calls
no test coverage detected