Skip to content

Commit

Permalink
Close file before deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
0cc4m committed Oct 14, 2023
1 parent 7efac61 commit bd05447
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ggml_vk_generate_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,11 @@ async def string_to_spv_file(name, code, defines, fp16):
cmd.extend([f"-D{key}={value}" for key, value in defines.items()])
code_with_lines = "\n".join([f"{i}: {line}" for i, line in enumerate(preprocessed_code.splitlines())])
print(f"ERROR compiling {name}\n\n{code_with_lines}\n\n{error=}")
f.close()
os.remove(f.name)
sys.exit(proc.returncode)

f.close()
os.remove(f.name)


Expand Down

0 comments on commit bd05447

Please sign in to comment.