@@ -59,7 +59,7 @@ function run() {
59
59
torch-mlir-ext)
60
60
clean_wheels torch_mlir_ext " $python_version "
61
61
build_torch_mlir_ext torch_mlir_ext " $python_version "
62
- run_audit_wheel torch_mlir_ext " $python_version "
62
+ run_audit_wheel_ext torch_mlir_ext " $python_version "
63
63
;;
64
64
torch-mlir)
65
65
clean_wheels torch_mlir " $python_version "
@@ -120,7 +120,7 @@ function clean_wheels() {
120
120
rm -f " $output_dir " /" ${wheel_basename} " -* -" ${python_version// ./ } " -* .whl
121
121
}
122
122
123
- function run_audit_wheel () {
123
+ function run_audit_wheel_ext () {
124
124
set +x
125
125
local wheel_basename=" $1 "
126
126
local python_version=" $2 "
@@ -141,4 +141,24 @@ function run_audit_wheel() {
141
141
fi
142
142
}
143
143
144
+ function run_audit_wheel() {
145
+ set +x
146
+ local wheel_basename=" $1 "
147
+ local python_version=" $2 "
148
+ generic_wheel=$( ls " $output_dir " /" ${wheel_basename} " -* | grep " ${python_version// ./ } " )
149
+ echo " Looking for $generic_wheel "
150
+ if [ -f " $generic_wheel " ]; then
151
+ echo " $generic_wheel found. Delocating it.."
152
+ rm -rf " $output_dir " /test_venv
153
+ python" ${python_version} " -m venv " $output_dir " /test_venv
154
+ source " $output_dir " /test_venv/bin/activate
155
+ python" ${python_version} " -m pip install -U pip
156
+ python" ${python_version} " -m pip install -r " $repo_root " /build-requirements.txt
157
+ python" ${python_version} " -m pip install " $generic_wheel "
158
+ DYLD_LIBRARY_PATH=" $output_dir " /test_venv/lib/python" ${python_version} " /site-packages/torch/lib delocate-wheel -v " $generic_wheel "
159
+ deactivate
160
+ rm -rf " $output_dir " /test_venv
161
+ fi
162
+ }
163
+
144
164
run
0 commit comments