Migrate from lru_cache to cache (#155613)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155613
Approved by: https://github.com/ezyang
ghstack dependencies: #155612
This commit is contained in:
Oguz Ulgen
2025-06-11 08:59:26 -07:00
committed by PyTorch MergeBot
parent f80a61adf5
commit d1947a8707
70 changed files with 157 additions and 157 deletions

View File

@ -441,7 +441,7 @@ def get_wrapper_codegen_for_device(
return None
@functools.lru_cache(None)
@functools.cache
def init_backend_registration() -> None:
from .cpp import CppScheduling
from .cpp_wrapper_cpu import CppWrapperCpu
@ -2223,7 +2223,7 @@ class OptimizationContext:
ops_name: str = ""
@functools.lru_cache(None)
@functools.cache
def jinja2_env() -> Any:
try:
import jinja2