mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Turn off remote caching in unit tests unless explicitly on (#133258)
Summary: This PR turns off remote caching in unit tests unless the unit test explicitly turns it on. Test Plan: existing tests Differential Revision: D61152154 Pull Request resolved: https://github.com/pytorch/pytorch/pull/133258 Approved by: https://github.com/masnesral
This commit is contained in:
committed by
PyTorch MergeBot
parent
1e9bedf688
commit
fa36eba77d
@ -419,6 +419,10 @@ def should_use_remote_fx_graph_cache():
|
||||
return config.fx_graph_remote_cache
|
||||
if not config.is_fbcode():
|
||||
return False
|
||||
|
||||
if torch._utils_internal.is_fb_unit_test():
|
||||
return False
|
||||
|
||||
try:
|
||||
from torch._inductor.fb.remote_cache import REMOTE_CACHE_VERSION
|
||||
except ModuleNotFoundError:
|
||||
|
||||
@ -1026,6 +1026,8 @@ def should_use_remote_autotune_cache(inductor_meta):
|
||||
return inductor_meta.get("autotune_remote_cache")
|
||||
if not inductor_meta.get("is_fbcode"):
|
||||
return False
|
||||
if torch._utils_internal.is_fb_unit_test():
|
||||
return False
|
||||
if inductor_meta.get("is_hip"):
|
||||
return False
|
||||
|
||||
|
||||
@ -184,6 +184,10 @@ def justknobs_getval_int(name: str) -> int:
|
||||
return 0
|
||||
|
||||
|
||||
def is_fb_unit_test() -> bool:
|
||||
return False
|
||||
|
||||
|
||||
@functools.lru_cache(None)
|
||||
def max_clock_rate():
|
||||
if not torch.version.hip:
|
||||
|
||||
Reference in New Issue
Block a user