File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ def compile_tile(pyfunc,
210210 _log_mlir (bytecode_buf )
211211
212212 if CUDA_TILE_DUMP_BYTECODE is not None :
213- if not os .path .exists (CUDA_TILE_DUMP_BYTECODE ):
213+ if not os .path .isdir (CUDA_TILE_DUMP_BYTECODE ):
214214 os .makedirs (CUDA_TILE_DUMP_BYTECODE )
215215 base_filename = os .path .basename (func_ir .loc .filename .split ("." )[0 ])
216216 path = os .path .join (CUDA_TILE_DUMP_BYTECODE ,
@@ -224,7 +224,7 @@ def compile_tile(pyfunc,
224224 try :
225225 from cuda .tile_internal ._internal_cext import bytecode_to_mlir_text
226226 mlir_text = bytecode_to_mlir_text (bytecode_buf )
227- if not os .path .exists (CUDA_TILE_DUMP_TILEIR ):
227+ if not os .path .isdir (CUDA_TILE_DUMP_TILEIR ):
228228 os .makedirs (CUDA_TILE_DUMP_TILEIR )
229229 base_filename = os .path .basename (func_ir .loc .filename .split ("." )[0 ])
230230 path = os .path .join (
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ def get_temp_dir_from_env() -> str:
6262 if dir == "" :
6363 dir = tempfile .mkdtemp ()
6464 atexit .register (_clean_tmp_dir , dir )
65+ if not os .path .isdir (dir ):
66+ os .makedirs (dir )
6567 return dir
6668
6769
You can’t perform that action at this time.
0 commit comments