@@ -122,12 +122,10 @@ def update_wheel(wheel_path) -> None:
122
122
"/usr/local/cuda/lib64/libcudnn_cnn_train.so.8" ,
123
123
"/usr/local/cuda/lib64/libcudnn_ops_infer.so.8" ,
124
124
"/usr/local/cuda/lib64/libcudnn_ops_train.so.8" ,
125
- "/opt/conda/envs/aarch64_env/lib/libopenblas.so.0" ,
126
- "/opt/conda/envs/aarch64_env/lib/libgfortran.so.5" ,
127
125
"/opt/conda/envs/aarch64_env/lib/libgomp.so.1" ,
126
+ "/opt/OpenBLAS/lib/libopenblas.so.0" ,
128
127
"/acl/build/libarm_compute.so" ,
129
128
"/acl/build/libarm_compute_graph.so" ,
130
- "/acl/build/libarm_compute_core.so" ,
131
129
]
132
130
# Copy libraries to unzipped_folder/a/lib
133
131
for lib_path in libs_to_copy :
@@ -140,10 +138,10 @@ def update_wheel(wheel_path) -> None:
140
138
os .system (f"cd { folder } /tmp/; zip -r { folder } /cuda_wheel/{ wheelname } *" )
141
139
shutil .move (
142
140
f"{ folder } /cuda_wheel/{ wheelname } " ,
143
- f"/dist /{ wheelname } " ,
141
+ f"{ folder } /{ wheelname } " ,
144
142
copy_function = shutil .copy2 ,
145
143
)
146
- os .system (f"rm -rf { folder } /tmp { folder } /dist /cuda_wheel/" )
144
+ os .system (f"rm -rf { folder } /tmp/ { folder } /cuda_wheel/" )
147
145
148
146
149
147
def complete_wheel (folder : str ) -> str :
@@ -201,8 +199,9 @@ def parse_arguments():
201
199
branch = "master"
202
200
203
201
print ("Building PyTorch wheel" )
204
- build_vars = "CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 "
205
- os .system ("python setup.py clean" )
202
+ os .system ("export USE_PRIORITIZED_TEXT_FOR_LD=1" ) #enable linker script optimization https://github.com/pytorch/pytorch/pull/121975/files
203
+ build_vars = "MAX_JOBS=5 CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 "
204
+ os .system ("cd /pytorch; python setup.py clean" )
206
205
207
206
override_package_version = os .getenv ("OVERRIDE_PACKAGE_VERSION" )
208
207
if override_package_version is not None :
0 commit comments