File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,11 +63,17 @@ if(EXECUTORCH_BUILD_PYBIND)
6363 endif ()
6464
6565 if (EXECUTORCH_BUILD_XNNPACK)
66- # need to explicitly specify XNNPACK and xnnpack-microkernels-prod here
67- # otherwise uses XNNPACK and microkernel-prod symbols from libtorch_cpu
68- list (APPEND _pybind_training_dep_libs xnnpack_backend XNNPACK
69- xnnpack-microkernels-prod
70- )
66+ if (EXECUTORCH_BUILD_SHARED)
67+ # The delegate bundles XNNPACK and its microkernels, so naming them again
68+ # here would ask for a second copy of what that library already provides.
69+ list (APPEND _pybind_training_dep_libs xnnpack_backend)
70+ else ()
71+ # need to explicitly specify XNNPACK and xnnpack-microkernels-prod here
72+ # otherwise uses XNNPACK and microkernel-prod symbols from libtorch_cpu
73+ list (APPEND _pybind_training_dep_libs xnnpack_backend XNNPACK
74+ xnnpack-microkernels-prod
75+ )
76+ endif ()
7177 endif ()
7278
7379 pybind11_add_module (
Original file line number Diff line number Diff line change @@ -323,6 +323,10 @@ def get_build_type(is_debug=None) -> str:
323323_UNSUPPORTED_WHEEL_HEADERS = frozenset (
324324 {
325325 "bundled_module.h" ,
326+ # These two include a third-party header the wheel does not ship, so they
327+ # cannot compile from an installed package no matter what is linked.
328+ "cpuinfo_utils.h" ,
329+ "threadpool.h" ,
326330 "file_descriptor_data_loader.h" ,
327331 "serialize.h" ,
328332 }
You can’t perform that action at this time.
0 commit comments