We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1783893 + 145dc25 commit a36ec66Copy full SHA for a36ec66
python/test/unit/conftest.py
@@ -70,11 +70,10 @@ def device(request):
70
@pytest.fixture
71
def fresh_triton_cache():
72
with tempfile.TemporaryDirectory() as tmpdir:
73
- try:
74
- os.environ["TRITON_CACHE_DIR"] = tmpdir
+ from triton import knobs
+ with knobs.cache.scope():
75
+ knobs.cache.dir = tmpdir
76
yield tmpdir
- finally:
77
- os.environ.pop("TRITON_CACHE_DIR", None)
78
79
80
def _fresh_knobs_impl(monkeypatch, skipped_attr: Optional[Set[str]] = None):
0 commit comments