MCPcopy Create free account
hub / github.com/XiaoMi/mace / create_output_dir

Function create_output_dir

mace/python/tools/encrypt_opencl_codegen.py:41–54  ·  view source on GitHub ↗
(dir_path)

Source from the content-addressed store, hash-verified

39
40
41def create_output_dir(dir_path):
42 if os.path.exists(dir_path):
43 if os.path.isdir(dir_path):
44 try:
45 shutil.rmtree(dir_path)
46 except OSError:
47 raise RuntimeError(
48 "Cannot delete directory %s due to permission "
49 "error, inspect and remove manually" % dir_path)
50 else:
51 raise RuntimeError(
52 "Cannot delete non-directory %s, inspect ",
53 "and remove manually" % dir_path)
54 os.makedirs(dir_path)
55
56
57def write_cl_encrypted_kernel_to_file(

Callers 1

encrypt_opencl_codegenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected