Compare commits

..

1 Commits

Author SHA1 Message Date
a206dcc79e fb_memcache: Move to fbcode from thirdparty (#128174)
Summary: The fb_memcache injections location and path is changing.

Test Plan: Existing tests should pass.

Reviewed By: bertmaher, oulgen

Differential Revision: D57973772

Pull Request resolved: https://github.com/pytorch/pytorch/pull/128174
Approved by: https://github.com/oulgen
2024-06-11 07:46:12 +00:00
5 changed files with 11 additions and 7 deletions

View File

@ -195,7 +195,7 @@ class TestFxGraphCache(TestCase):
num_put += 1
cache_module = (
"triton.runtime.fb_memcache.FbMemcacheRemoteFxGraphCacheBackend"
"triton.fb.fb_memcache.FbMemcacheRemoteFxGraphCacheBackend"
if config.is_fbcode()
else "torch._inductor.remote_cache.RedisRemoteCacheBackend"
)

View File

@ -267,7 +267,7 @@ class TestMaxAutotune(TestCase):
num_put += 1
cache_module = (
"triton.runtime.fb_memcache.FbMemcacheRemoteAutotuneCacheBackend"
"triton.fb.fb_memcache.FbMemcacheRemoteAutotuneCacheBackend"
if config.is_fbcode()
else "torch._inductor.remote_cache.RedisRemoteCacheBackend"
)

View File

@ -1021,7 +1021,7 @@ class FxGraphCache:
cache_id = "fx-graph-v1"
try:
if config.is_fbcode():
from triton.runtime.fb_memcache import (
from triton.fb.fb_memcache import (
FbMemcacheRemoteFxGraphCacheBackend,
)

View File

@ -400,7 +400,7 @@ def should_use_remote_fx_graph_cache():
return False
try:
from triton.runtime.fb_memcache import MEMCACHE_VERSION
from triton.fb.fb_memcache import MEMCACHE_VERSION
except ModuleNotFoundError:
return False

View File

@ -1031,7 +1031,7 @@ def should_use_remote_autotune_cache(inductor_meta):
if inductor_meta.get("is_hip"):
return False
from triton.runtime.fb_memcache import MEMCACHE_VERSION
from triton.fb.fb_memcache import MEMCACHE_VERSION
return MEMCACHE_VERSION >= torch._utils_internal.justknobs_getval_int(
"pytorch/remote_cache:autotune_memcache_version"
@ -1075,8 +1075,12 @@ def cached_autotune(
try:
if inductor_meta.get("is_fbcode"):
remote_cache = triton.runtime.fb_memcache.FbMemcacheRemoteAutotuneCacheBackend(
key
import triton.fb.fb_memcache
remote_cache = (
triton.fb.fb_memcache.FbMemcacheRemoteAutotuneCacheBackend(
key
)
)
else:
from torch._inductor.remote_cache import RedisRemoteCacheBackend