Skip to content
Merged
4 changes: 4 additions & 0 deletions tests/models/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def pytest_sessionstart(session):
os.environ.setdefault("DTLOG_LEVEL", "error")
os.environ.setdefault("DT_DEEPRT_VERBOSE", "-1")

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


def pytest_addoption(parser):
parser.addoption(
Expand Down
Loading