Skip to content
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["TORCH_SENDNN_CACHE_DIR"] = os.path.join(os.getcwd(), ".cache")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a setdefault, this way it will only set it if a user did not already specify it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Changed it



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