mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-19 22:39:03 +00:00
Fix race conditions in ck_tile remod (#3061)
This commit is contained in:
@@ -10,15 +10,16 @@ for p in sorted(Path("./").rglob("*")):
|
||||
|
||||
|
||||
# formatting
|
||||
format_procs = []
|
||||
for x in all_files:
|
||||
subprocess.Popen(
|
||||
f"python -m dos2unix {str(x)} {str(x)}",
|
||||
shell=True,
|
||||
stdout=open(os.devnull, "wb"),
|
||||
dos2unix = f"python -m dos2unix {str(x)} {str(x)}"
|
||||
clang_format = f"clang-format -style=file -i {str(x)}"
|
||||
# One process to avoid race conditions.
|
||||
cmd = f"{dos2unix} && {clang_format}"
|
||||
format_procs.append(
|
||||
subprocess.Popen(cmd, shell=True, stdout=open(os.devnull, "wb"))
|
||||
)
|
||||
cmd = f"clang-format -style=file -i {str(x)}"
|
||||
# for xp in x.parents:
|
||||
# print(get_file_base(x))
|
||||
subprocess.Popen(cmd, shell=True)
|
||||
|
||||
# print(all_files)
|
||||
# Wait for formatting to complete.
|
||||
for p in format_procs:
|
||||
p.wait()
|
||||
|
||||
@@ -85,18 +85,19 @@ class submodule_t:
|
||||
|
||||
submodule = submodule_t()
|
||||
# formatting
|
||||
format_procs = []
|
||||
for x in all_files:
|
||||
subprocess.Popen(
|
||||
f"python -m dos2unix {str(x)} {str(x)}",
|
||||
shell=True,
|
||||
stdout=open(os.devnull, "wb"),
|
||||
dos2unix = f"python -m dos2unix {str(x)} {str(x)}"
|
||||
clang_format = f"clang-format -style=file -i {str(x)}"
|
||||
# One process to avoid race conditions.
|
||||
cmd = f"{dos2unix} && {clang_format}"
|
||||
format_procs.append(
|
||||
subprocess.Popen(cmd, shell=True, stdout=open(os.devnull, "wb"))
|
||||
)
|
||||
cmd = f"clang-format -style=file -i {str(x)}"
|
||||
# for xp in x.parents:
|
||||
# print(get_file_base(x))
|
||||
subprocess.Popen(cmd, shell=True)
|
||||
submodule.push(x)
|
||||
|
||||
submodule.gen()
|
||||
# Wait for formatting to complete before generating headers.
|
||||
for p in format_procs:
|
||||
p.wait()
|
||||
|
||||
# print(all_files)
|
||||
submodule.gen()
|
||||
|
||||
Reference in New Issue
Block a user