File tree Expand file tree Collapse file tree 7 files changed +765
-1
lines changed
Expand file tree Collapse file tree 7 files changed +765
-1
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,36 @@ jobs:
271271 exit 1
272272 fi
273273
274+ nxp-build-test :
275+ name : nxp-build-test
276+ uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
277+ permissions :
278+ id-token : write
279+ contents : read
280+ with :
281+ runner : linux.2xlarge
282+ docker-image : executorch-ubuntu-22.04-arm-sdk
283+ submodules : ' recursive'
284+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
285+ timeout : 90
286+ script : |
287+ # The generic Linux job chooses to use base env, not the one setup by the image
288+ CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
289+ conda activate "${CONDA_ENV}"
290+
291+ # Build
292+ cmake -DEXECUTORCH_BUILD_NXP_NEUTRON=ON -Bcmake-out .
293+ cmake --build cmake-out --target executorch_delegate_neutron --config Release
294+
295+ # Build check for the neutron backend library
296+ lib_neutron="cmake-out/backends/nxp/libexecutorch_delegate_neutron.a"
297+ if [ -f $lib_neutron ]; then
298+ echo "Neutron backend library built."
299+ else
300+ echo "Neutron backend library not found!"
301+ exit 1
302+ fi
303+
274304 test-coreml-delegate :
275305 name : test-coreml-delegate
276306 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
Original file line number Diff line number Diff line change @@ -496,6 +496,10 @@ if(EXECUTORCH_BUILD_CADENCE)
496496 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/cadence)
497497endif ()
498498
499+ if (EXECUTORCH_BUILD_NXP_NEUTRON)
500+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/nxp)
501+ endif ()
502+
499503if (EXECUTORCH_BUILD_COREML)
500504 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/apple /coreml)
501505endif ()
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+ set (
7+ _common_include_directories
8+ ${CMAKE_CURRENT_SOURCE_DIR} /../../..
9+ ${CMAKE_CURRENT_SOURCE_DIR} /../../runtime/core/portable_type/c10
10+ )
11+ add_compile_definitions (C10_USING_CUSTOM_GENERATED_MACROS)
12+
13+ set (_neutron_sources ${CMAKE_CURRENT_SOURCE_DIR} /runtime/NeutronBackend.cpp )
14+
15+ add_library (executorch_delegate_neutron STATIC ${_neutron_sources} )
16+ target_include_directories (
17+ executorch_delegate_neutron PUBLIC ${_common_include_directories}
18+ )
You can’t perform that action at this time.
0 commit comments