File tree Expand file tree Collapse file tree 5 files changed +745
-0
lines changed
Expand file tree Collapse file tree 5 files changed +745
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ option(EXECUTORCH_BUILD_ARM_BAREMETAL
170170 "Build the Arm Baremetal flow for Cortex-M and Ethos-U" OFF
171171)
172172
173+ option (EXECUTORCH_BUILD_NXP_NEUTRON "Build the NXP Neutron NPU library" OFF )
174+
173175option (EXECUTORCH_BUILD_COREML "Build the Core ML backend" OFF )
174176
175177option (EXECUTORCH_BUILD_KERNELS_CUSTOM "Build the custom kernels" OFF )
@@ -710,6 +712,10 @@ if(EXECUTORCH_BUILD_CADENCE)
710712 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/cadence)
711713endif ()
712714
715+ if (EXECUTORCH_BUILD_NXP_NEUTRON)
716+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/nxp)
717+ endif ()
718+
713719if (EXECUTORCH_BUILD_COREML)
714720 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/apple /coreml)
715721endif ()
Original file line number Diff line number Diff line change 1+ # Copyright 2024 NXP
2+ #
3+ # This source code is licensed under the BSD-style license found in the
4+ # LICENSE file in the root directory of this source tree.
5+
6+ cmake_minimum_required (VERSION 3.19)
7+ project (neutron_backend)
8+
9+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
10+
11+ # Source root directory for executorch.
12+ if (NOT EXECUTORCH_ROOT)
13+ set (EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../..)
14+ endif ()
15+
16+ include (${EXECUTORCH_ROOT} /tools/cmake/Utils.cmake)
17+
18+ set (_common_include_directories ${EXECUTORCH_ROOT} /.. ${EXECUTORCH_ROOT} /runtime/core/portable_type/c10)
19+ add_compile_definitions (C10_USING_CUSTOM_GENERATED_MACROS)
20+
21+ set (_neutron_sources backends/nxp/runtime/NeutronBackend.cpp )
22+
23+ list (TRANSFORM _neutron_sources PREPEND "${EXECUTORCH_ROOT} /" )
24+
25+ add_library (executorch_delegate_neutron STATIC ${_neutron_sources} )
26+ target_include_directories (
27+ executorch_delegate_neutron PUBLIC ${_common_include_directories}
28+ )
You can’t perform that action at this time.
0 commit comments