macOS Python wheel _portable_lib has non-relocatable libtorch rpath
Maintainer thường phản hồi trong vòng 1 ngày
@JacobSzwejbka đang làm issue này rồi.
Từ ngày 14/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
The macOS ExecuTorch nightly wheel installs executorch.extension.pybindings._portable_lib, but its Mach-O rpath points at a CI-only Torch directory. On a normal virtual environment, importing the module fails because @rpath/libtorch_python.dylib cannot be resolved.
It can be worked around with
DYLD_FALLBACK_LIBRARY_PATH="$VIRTUAL_ENV/lib/python3.13/site-packages/torch/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}" python -c 'import
│ executorch.extension.pybindings._portable_lib; print("portable pybind runtime loaded")'
Environment
- macOS
- Python 3.13.3
executorch==1.4.0.dev20260818torch==2.13.0
Reproduction
python -c "import executorch.extension.pybindings._portable_lib"
The import fails with:
dlopen(.../_portable_lib.cpython-313-darwin.so, 0x0002): Library not loaded: @rpath/libtorch_python.dylib
Reason: tried: '/Users/runner/work/_temp/conda_environment_32133036333/lib/python3.13/site-packages/torch/lib/libtorch_python.dylib' (no such file),
Evidence
otool -L venv/lib/python3.13/site-packages/executorch/extension/pybindings/_portable_lib.cpython-313-darwin.so
otool -l venv/lib/python3.13/site-packages/executorch/extension/pybindings/_portable_lib.cpython-313-darwin.so
The extension links against:
@rpath/libtorch_python.dylib
@rpath/libtorch.dylib
@rpath/libtorch_cpu.dylib
@rpath/libc10.dylib
but contains only this rpath:
Load command 25
cmd LC_RPATH
cmdsize 112
path /Users/runner/work/_temp/conda_environment_32133036333/lib/python3.13/site-packages/torch/lib (offset 12)
That build-machine path does not exist for wheel users.
Expected behavior
The wheel should be relocatable: _portable_lib should locate the libtorch*.dylib files supplied by the installed Torch wheel, for example via an appropriate relative @loader_path/@rpath installation layout or a repaired wheel rpath.
Actual behavior
The native runtime cannot load, so downstream packages cannot register native backends against it. The failure can be easy to miss when callers catch OSError to keep their Python package importable; backend availability then fails later at model load.
- Ngôn ngữ chính
- Python
- Star
- 5.1k
- Fork
- 1.2k
- Merge trung bình
- 2 ngày 14 phút
- Pull request đã merge (30 ngày)
- 704
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pytorch/executorch
-
Portable remainder kernel: wrong sign for integers and float64 rounded to floatCó thể đã có người làm @JakeStevens đã nhận 5 ngày trước. Đang mởbug module: kernels triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pytorch/executorch#23682 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement triaged
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
pytorch/executorch#21640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[QNN] 16a4w_block stride-2 conv + ReLU fails HTP graph prepare on SM8850 (Relu16bParamsPlaceholder)Có thể đã có người làm @psiddh đã nhận 1 ngày trước. Đang mởbug module: qnn partner: qualcomm
pytorch/executorch#23922 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 40/100
pytorch/executorch#23913 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cortex-M backend replaces channels-first dw conv with channels-last dw conv without handling the changed layout, fails at runtimeCó thể đã có người làm @rahimuddin140 đã nhận 1 ngày trước. Đang mởbug module: microcontrollers partner: arm
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
pytorch/executorch#23812 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pytorch/executorch
Issue tương tự
-
`lvm_compact` has no self-hosted twin, and `docs/158` §5 says every language-face component mustĐang mởbug sev-3 vm
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sierra-research/tau2-bench#635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The add-ssm-model skill requires a Cython simulator; the contributing guide allows Python onesCó thể đã có người làm @fmuia đã nhận hôm nay. Đang mởdocumentation skill
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
lnccbrown/ssm-simulators#406 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
btclib-org/btclib-ecc#309 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
autowarefoundation/autoware_carla_scenario#281 ·
Maintainer thường phản hồi trong vòng 1 ngày