Skip to content

Commit 0926610

Browse files
committed
Use check_call for applying the patch
Otherwise, if it fails to apply one would never know
1 parent 9329cbe commit 0926610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aarch64_linux/aarch64_wheel_ci_build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ def parse_arguments():
108108

109109
# patch mkldnn to fix aarch64 mac and aws lambda crash
110110
print("Applying mkl-dnn patch to fix crash due to /sys not accesible")
111-
os.system("cd /pytorch/third_party/ideep/mkl-dnn && patch -p1 < /builder/mkldnn_fix/fix-xbyak-failure.patch")
111+
with open("/builder/mkldnn_fix/fix-xbyak-failure.patch") as f:
112+
check_call(["patch", "-p1"], stdin=f, cwd="/pytorch/third_party/ideep/mkl-dnn")
112113

113114
os.system(f"cd /pytorch; {build_vars} python3 setup.py bdist_wheel")
114115
pytorch_wheel_name = complete_wheel("pytorch")

0 commit comments

Comments
 (0)