Fix xnnpack pybind (#2802)
Summary: Fixing XNNPACK Pybind. Currently pybindings for xnnpack fail due to uninitialized error. We notice the following: ``` (gdb) info symbol xnn_initialize xnn_initialize in section .text of /home/maxren/.conda/envs/executorch/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so (gdb) info symbol xnn_create_subgraph xnn_create_subgraph in section .text of /home/maxren/.conda/envs/executorch/lib/python3.10/site-packages/executorch/extension/pybindings/portable_lib.cpython-310-x86_64-linux-gnu.so ``` That is xnn_initialize symbole comes from libtorch_cpu, but when we call xnn_create_subgraph we call it from another library. It seems like explicitly adding XNNPACK to the portable_libs pybind fixes this problem. Additionaly, we fix some fPIC issues when building XNNPACK. Pull Request resolved: https://github.com/pytorch/executorch/pull/2802 Reviewed By: larryliu0820 Differential Revision: D55646601 Pulled By: mcr229 fbshipit-source-id: cf18de3246c9fdde4c08326c400d19cd407720e1
M
Max Ren committed
26d7bccb63c9432ded76a4ac2e57efa29ae93444
Parent: 8ab6daf
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 4/2/2024, 7:26:08 PM