Skip to content

Commit ef2b139

Browse files
pytorchbotatalman
andauthored
[Manylinux 2.28] Correct Linux aarch64 cuda binaries wheel name (pytorch#150820)
[Manylinux 2.28] Correct Linux aarch64 cuda binaries wheel name (pytorch#150786) Related to: pytorch#149044 (comment) For CPU binaries we run auditwheel however for cuda binaries auditwheel produces invalid results . Hence we need to rename the file. Pull Request resolved: pytorch#150786 Approved by: https://github.com/malfet (cherry picked from commit 836955b) Co-authored-by: atalman <[email protected]>
1 parent 3f236f1 commit ef2b139

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.ci/aarch64_linux/aarch64_wheel_ci_build.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ def complete_wheel(folder: str) -> str:
136136
"""
137137
wheel_name = list_dir(f"/{folder}/dist")[0]
138138

139+
# Please note for cuda we don't run auditwheel since we use custom script to package
140+
# the cuda dependencies to the wheel file using update_wheel() method.
141+
# However we need to make sure filename reflects the correct Manylinux platform.
139142
if "pytorch" in folder and not enable_cuda:
140143
print("Repairing Wheel with AuditWheel")
141144
check_call(["auditwheel", "repair", f"dist/{wheel_name}"], cwd=folder)
@@ -147,7 +150,14 @@ def complete_wheel(folder: str) -> str:
147150
f"/{folder}/dist/{repaired_wheel_name}",
148151
)
149152
else:
150-
repaired_wheel_name = wheel_name
153+
repaired_wheel_name = wheel_name.replace(
154+
"linux_aarch64", "manylinux_2_28_aarch64"
155+
)
156+
print(f"Renaming {wheel_name} wheel to {repaired_wheel_name}")
157+
os.rename(
158+
f"/{folder}/dist/{wheel_name}",
159+
f"/{folder}/dist/{repaired_wheel_name}",
160+
)
151161

152162
print(f"Copying {repaired_wheel_name} to artifacts")
153163
shutil.copy2(

0 commit comments

Comments
 (0)