Add a pure python wrapper to pybindings.portable_lib (#3137)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/3137 When installed as a pip wheel, we must import `torch` before trying to import the pybindings shared library extension. This will load libtorch.so and related libs, ensuring that the pybindings lib can resolve those runtime dependencies. So, add a pure python wrapper that lets us do this when users say `import executorch.extension.pybindings.portable_lib` We only need this for OSS, so don't bother doing this for other pybindings targets. Reviewed By: orionr, mikekgfb Differential Revision: D56317150 fbshipit-source-id: 920382636732aa276c25a76163afb7d28b1846d0
D
Dave Bort committed
969aa96904c436ee43bca0dd98bb431d298c1b72
Parent: 3bb591c
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 4/22/2024, 8:54:12 PM