mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
f80a61adf5
commit
d1947a8707
@ -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
|
||||
|
||||
Reference in New Issue
Block a user