(fn)
| 15 | """ |
| 16 | |
| 17 | def decorator(fn): |
| 18 | try: |
| 19 | compiled_fn = torch.compile(fn, **compile_kwargs) |
| 20 | |
| 21 | @wraps(fn) |
| 22 | def wrapper(*args, **kwargs): |
| 23 | try: |
| 24 | return compiled_fn(*args, **kwargs) |
| 25 | except Exception: |
| 26 | return fn(*args, **kwargs) |
| 27 | |
| 28 | return wrapper |
| 29 | except Exception: |
| 30 | return fn |
| 31 | |
| 32 | if func is None: |
| 33 | return decorator |
no outgoing calls
no test coverage detected