Skip to content

Commit 281ff22

Browse files
authored
Merge pull request #93 from alex-jw-brooks/test_cache_refactor
Refactor Decoder Tests
2 parents f6c9a8b + 70e84f5 commit 281ff22

File tree

2 files changed

+465
-298
lines changed

2 files changed

+465
-298
lines changed

tests/models/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def pytest_sessionstart(session):
2323
os.environ.setdefault("DTLOG_LEVEL", "error")
2424
os.environ.setdefault("DT_DEEPRT_VERBOSE", "-1")
2525

26+
# NOTE: we should configure the cachedir before importing torchsendnn's
27+
# graph cache to prevent it from being initialized in the wrong place.
28+
os.environ.setdefault("TORCH_SENDNN_CACHE_DIR", os.path.join(os.getcwd(), ".cache"))
29+
2630

2731
def pytest_addoption(parser):
2832
parser.addoption(

0 commit comments

Comments
 (0)