File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ def device(request):
1414
1515@pytest .fixture
1616def fresh_triton_cache ():
17- with tempfile .TemporaryDirectory () as tmpdir :
18- try :
19- os .environ ["TRITON_CACHE_DIR" ] = tmpdir
20- yield tmpdir
21- finally :
22- os .environ .pop ("TRITON_CACHE_DIR" , None )
17+ try :
18+ with tempfile .TemporaryDirectory () as tmpdir :
19+ try :
20+ os .environ ["TRITON_CACHE_DIR" ] = tmpdir
21+ yield tmpdir
22+ finally :
23+ os .environ .pop ("TRITON_CACHE_DIR" , None )
24+ except OSError :
25+ # Ignore errors, such as PermissionError, on Windows
26+ pass
Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ def device(request):
1414
1515@pytest .fixture
1616def fresh_triton_cache ():
17- with tempfile .TemporaryDirectory () as tmpdir :
18- try :
19- os .environ ["TRITON_CACHE_DIR" ] = tmpdir
20- yield tmpdir
21- finally :
22- os .environ .pop ("TRITON_CACHE_DIR" , None )
17+ try :
18+ with tempfile .TemporaryDirectory () as tmpdir :
19+ try :
20+ os .environ ["TRITON_CACHE_DIR" ] = tmpdir
21+ yield tmpdir
22+ finally :
23+ os .environ .pop ("TRITON_CACHE_DIR" , None )
24+ except OSError :
25+ # Ignore errors, such as PermissionError, on Windows
26+ pass
You can’t perform that action at this time.
0 commit comments