Skip to content

Commit 29c30fb

Browse files
committed
Include custom_ops and XNNPACK in executor_runner if built
Somebody (larryliu0820?) pointed out that there's no particular reason to require a separate xnn_executor_runner target, and indeed we already put several other optimized things in here if they're built. ghstack-source-id: 5f741f1 ghstack-comment-id: 2722889450 Pull Request resolved: #9248
1 parent 82f3381 commit 29c30fb

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.github/workflows/pull.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ jobs:
361361
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
362362
conda activate "${CONDA_ENV}"
363363
364+
./install_requirements.sh --use-pt-pinned-commit
364365
# build module for executorch.extension.pybindings.portable_lib
365366
bash test/build_size_test.sh
366367
strip cmake-out/test/size_test
@@ -396,6 +397,8 @@ jobs:
396397
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
397398
conda activate "${CONDA_ENV}"
398399
400+
./install_requirements.sh --use-pt-pinned-commit
401+
399402
# build module for executorch.extension.pybindings.portable_lib
400403
bash test/build_size_test.sh
401404
strip cmake-out/test/size_test
@@ -510,6 +513,7 @@ jobs:
510513
MODE=${{ matrix.mode }}
511514
PT2E_QUANTIZE=${{ matrix.pt2e_quantize }}
512515
516+
./install_requirements.sh --use-pt-pinned-commit
513517
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
514518
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
515519
@@ -541,6 +545,7 @@ jobs:
541545
542546
BUILD_TOOL="cmake"
543547
548+
./install_requirements.sh --use-pt-pinned-commit
544549
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
545550
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
546551

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ jobs:
572572
MODE=${{ matrix.mode }}
573573
PT2E_QUANTIZE=${{ matrix.pt2e_quantize }}
574574
575+
./install_requirements.sh --use-pt-pinned-commit
575576
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
576577
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
577578

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# It should also be cmake-lint clean.
4343
#
4444

45-
cmake_minimum_required(VERSION 3.19)
45+
cmake_minimum_required(VERSION 3.24)
4646
project(executorch)
4747
include(build/Utils.cmake)
4848
include(CMakeDependentOption)
@@ -919,6 +919,14 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
919919
list(APPEND _executor_runner_libs quantized_ops_lib)
920920
endif()
921921

922+
if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
923+
list(APPEND _executor_runner_libs $<LINK_LIBRARY:WHOLE_ARCHIVE,custom_ops>)
924+
endif()
925+
926+
if(EXECUTORCH_BUILD_XNNPACK)
927+
list(APPEND _executor_runner_libs xnnpack_backend)
928+
endif()
929+
922930
if(EXECUTORCH_ENABLE_EVENT_TRACER)
923931
if(EXECUTORCH_BUILD_DEVTOOLS)
924932
list(APPEND _executor_runner_libs etdump flatccrt)

backends/xnnpack/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ include(cmake/Dependencies.cmake)
118118
list(TRANSFORM _xnnpack_backend__srcs PREPEND "${EXECUTORCH_ROOT}/")
119119
add_library(xnnpack_backend STATIC ${_xnnpack_backend__srcs})
120120
target_link_libraries(
121-
xnnpack_backend PUBLIC ${xnnpack_third_party} executorch_core xnnpack_schema
121+
xnnpack_backend PUBLIC ${xnnpack_third_party} executorch_core xnnpack_schema extension_threadpool
122122
)
123123

124124
target_include_directories(

0 commit comments

Comments
 (0)