macOS Python wheel _portable_lib has non-relocatable libtorch rpath
Les mainteneurs répondent en général sous 1 jour
@JacobSzwejbka y travaille déjà.
Depuis le 14/10/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Python
- Étoiles
- 5.1k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 713
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pytorch/executorch
-
Portable remainder kernel: wrong sign for integers and float64 rounded to floatPeut-être pris @JakeStevens l’a pris il y a 3 jours. Ouvertebug module: kernels triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
pytorch/executorch#23682 · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement triaged
Difficulté 2/5 Une demi-journée Accessibilité débutants 68/100
pytorch/executorch#21640 ·
Les mainteneurs répondent en général sous 1 jour
-
bug module: microcontrollers partner: arm
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
pytorch/executorch#23812 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
[muse-glimmer] interpolate_pos_emb returns corrupted bf16 values on CPU and can segfaultPeut-être pris @JakeStevens l’a pris il y a 1 jour. Ouvertebug module: examples triaged
pytorch/executorch#23797 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Feedback about ToolsOuverteinvalid module: doc
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
pytorch/executorch#23706 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de pytorch/executorch
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
huggingface/sentence-transformers#4186 ·
Les mainteneurs répondent en général sous 5 jours
-
documentation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
QuantEcon/QuantEcon.py#988 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fabriziosalmi/certmate#1247 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
documentation good first issue
Difficulté 2/5 Une demi-journée Accessibilité débutants 72/100
sujithputta02/Esapay#13 ·