Skip to content

Commit 3471879

Browse files
use setdefault for torch sendnn cache dir
1 parent d870a24 commit 3471879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/models/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def pytest_sessionstart(session):
2525

2626
# NOTE: we should configure the cachedir before importing torchsendnn's
2727
# graph cache to prevent it from being initialized in the wrong place.
28-
os.environ["TORCH_SENDNN_CACHE_DIR"] = os.path.join(os.getcwd(), ".cache")
28+
os.environ.setdefault("TORCH_SENDNN_CACHE_DIR", os.path.join(os.getcwd(), ".cache"))
2929

3030

3131
def pytest_addoption(parser):

0 commit comments

Comments
 (0)