cyx-6 commented on code in PR #256: URL: https://github.com/apache/tvm-ffi/pull/256#discussion_r2517196674
########## addons/torch_c_dlpack_ext/build_aot_wheels.sh: ########## @@ -99,11 +119,17 @@ done cp "$tvm_ffi"/lib/*.so "$torch_c_dlpack_ext"/torch_c_dlpack_ext uv venv "$tvm_ffi"/.venv/build --python "$python_version" source "$tvm_ffi"/.venv/build/bin/activate -uv pip install build wheel auditwheel +uv pip install build wheel cd "$torch_c_dlpack_ext" python -m build -w ls dist -python -m wheel tags dist/*.whl --python-tag="$python_version" --abi-tag="$python_version" --remove -ls dist -auditwheel repair --exclude libtorch.so --exclude libtorch_cpu.so --exclude libc10.so --exclude libtorch_python.so dist/*.whl -w wheelhouse +if [[ "$os" == "Linux" ]]; then + python -m wheel tags dist/*.whl --python-tag="$python_version" --abi-tag="$python_version" --remove + uv pip install auditwheel + auditwheel repair --exclude libtorch.so --exclude libtorch_cpu.so --exclude libc10.so --exclude libtorch_python.so --exclude libtorch_cuda.so --exclude libc10_cuda.so dist/*.whl -w wheelhouse +else + python -m wheel tags dist/*.whl --python-tag="$python_version" --abi-tag="$python_version" --platform-tag=macosx_11_0_arm64 --remove + uv pip install delocate + delocate-wheel -v --ignore-missing-dependencies --exclude libtorch.dylib,libtorch_cpu.dylib,libc10.dylib,libtorch_python.dylib dist/*.whl -w wheelhouse Review Comment: `--exclude` might be redundant here, as the building venv does not contain torch related lib. and `delocate-wheel` will still ask for these libs. actually `--ignore-missing-dependencies` depresses the such missing libs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
