Download timm/utils/jit.py from RahmaDev/OGSO_IA: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/spaces/RahmaDev/OGSO_IA/resolve/main/timm/utils/jit.py
- Command line
-
hf download hf://spaces/RahmaDev/OGSO_IA/timm/utils/jit.py
-
curl -L -o jit.py https://huggingface.co/spaces/RahmaDev/OGSO_IA/resolve/main/timm/utils/jit.py
648 Bytes
| """ JIT scripting/tracing utils | |
| Hacked together by / Copyright 2020 Ross Wightman | |
| """ | |
| import torch | |
| def set_jit_legacy(): | |
| """ Set JIT executor to legacy w/ support for op fusion | |
| This is hopefully a temporary need in 1.5/1.5.1/1.6 to restore performance due to changes | |
| in the JIT exectutor. These API are not supported so could change. | |
| """ | |
| # | |
| assert hasattr(torch._C, '_jit_set_profiling_executor'), "Old JIT behavior doesn't exist!" | |
| torch._C._jit_set_profiling_executor(False) | |
| torch._C._jit_set_profiling_mode(False) | |
| torch._C._jit_override_can_fuse_on_gpu(True) | |
| #torch._C._jit_set_texpr_fuser_enabled(True) | |