@@ -351,6 +351,9 @@ add_library(executorch_core ${_executorch_core__srcs})
351
351
# Legacy name alias.
352
352
add_library (executorch_no_prim_ops ALIAS executorch_core)
353
353
354
+ # A list of all configured backends.
355
+ set (_executorch_backends "" )
356
+
354
357
target_link_libraries (executorch_core PRIVATE program_schema)
355
358
if (ANDROID)
356
359
target_link_libraries (executorch_core PUBLIC log )
@@ -494,6 +497,7 @@ install(FILES tools/cmake/Utils.cmake tools/cmake/executorch-config.cmake
494
497
495
498
if (EXECUTORCH_BUILD_ARM_BAREMETAL)
496
499
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/arm)
500
+ list (APPEND _executorch_backends executorch_delegate_ethos_u)
497
501
endif ()
498
502
499
503
if (EXECUTORCH_BUILD_CADENCE)
@@ -502,30 +506,37 @@ endif()
502
506
503
507
if (EXECUTORCH_BUILD_NXP_NEUTRON)
504
508
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/nxp)
509
+ list (APPEND _executorch_backends executorch_delegate_neutron)
505
510
endif ()
506
511
507
512
if (EXECUTORCH_BUILD_COREML)
508
513
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/apple /coreml)
514
+ list (APPEND _executorch_backends coremldelegate)
509
515
endif ()
510
516
511
517
if (EXECUTORCH_BUILD_MPS)
512
518
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/apple /mps)
519
+ list (APPEND _executorch_backends mpsdelegate)
513
520
endif ()
514
521
515
522
if (EXECUTORCH_BUILD_NEURON)
516
523
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/mediatek)
524
+ list (APPEND _executorch_backends neuron_backend)
517
525
endif ()
518
526
519
527
if (EXECUTORCH_BUILD_OPENVINO)
520
528
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/openvino)
529
+ list (APPEND _executorch_backends openvino_backend)
521
530
endif ()
522
531
523
532
if (EXECUTORCH_BUILD_QNN)
524
533
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/qualcomm)
534
+ list (APPEND _executorch_backends qnn_executorch_backend)
525
535
endif ()
526
536
527
537
if (EXECUTORCH_BUILD_XNNPACK)
528
538
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/xnnpack)
539
+ list (APPEND _executorch_backends xnnpack_backend)
529
540
endif ()
530
541
531
542
if (EXECUTORCH_BUILD_CORTEX_M)
@@ -689,6 +700,17 @@ if(EXECUTORCH_BUILD_KERNELS_QUANTIZED)
689
700
target_link_options_shared_lib(quantized_ops_lib)
690
701
endif ()
691
702
703
+ if (EXECUTORCH_BUILD_VULKAN)
704
+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/vulkan)
705
+ list (APPEND _executorch_backends vulkan_backend)
706
+ endif ()
707
+
708
+ # Top-level interface targets.
709
+ add_library (executorch_backends INTERFACE )
710
+
711
+ # A target containing all configured backends.
712
+ target_link_libraries (executorch_backends INTERFACE ${_executorch_backends} )
713
+
692
714
if (EXECUTORCH_BUILD_EXECUTOR_RUNNER)
693
715
# Baseline libraries that executor_runner will link against.
694
716
set (_executor_runner_libs executorch gflags)
0 commit comments