Skip to content

Commit

Permalink
Fix potential multi-process compile issue (#610)
Browse files Browse the repository at this point in the history
When running with multi-process, multiple processes may enter the if
branch and the latter one cannot mkdir successfully. Adding such flag to
it is enough to solve the issue.
  • Loading branch information
Pzzzzz5142 authored Nov 14, 2024
1 parent ff05155 commit a3360ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/flashinfer/jit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def load_cuda_ops(
check_cuda_arch()
build_directory = FLASHINFER_JIT_DIR / name
if not os.path.exists(build_directory):
os.makedirs(build_directory)
os.makedirs(build_directory, exist_ok=True)
if extra_include_paths is None:
extra_include_paths = [
FLASHINFER_INCLUDE_DIR,
Expand Down

0 comments on commit a3360ff

Please # to comment.