(*args, **kwargs)
| 389 | # Chose a different decorator name than in tests so it's clear they are not the same. |
| 390 | @functools.wraps(func) |
| 391 | def wrapper(*args, **kwargs): |
| 392 | if is_torch_available(): |
| 393 | return func(*args, **kwargs) |
| 394 | else: |
| 395 | raise ImportError(f'Method `{func.__name__}` requires PyTorch.') |
| 396 | |
| 397 | return wrapper |
| 398 |
nothing calls this directly
no test coverage detected
searching dependent graphs…