Skip to content

Commit b0f0f1c

Browse files
milesmanxpjirioc
authored andcommitted
NXP backend: Fix NeutronConfig copy callback signature to match the driver header
1 parent 3da6123 commit b0f0f1c

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.github/workflows/pull.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ jobs:
17451745
conda activate "${CONDA_ENV}"
17461746
17471747
# Build
1748-
cmake -DEXECUTORCH_BUILD_NXP_NEUTRON=ON -Bcmake-out .
1748+
cmake -DEXECUTORCH_BUILD_NXP_NEUTRON=ON -DEXECUTORCH_BUILD_NXP_NEUTRON_EXTERNAL_MEM=ON -Bcmake-out .
17491749
cmake --build cmake-out --target executorch_delegate_neutron --config Release
17501750
17511751
# Build check for the neutron backend library

‎backends/nxp/CMakeLists.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
77
add_compile_definitions(C10_USING_CUSTOM_GENERATED_MACROS)
88

9+
if(EXECUTORCH_BUILD_NXP_NEUTRON_EXTERNAL_MEM)
10+
add_compile_definitions(EXTERNAL_MEM)
11+
endif()
12+
913
set(_neutron_sources ${CMAKE_CURRENT_SOURCE_DIR}/runtime/NeutronBackend.cpp)
1014

1115
add_library(executorch_delegate_neutron STATIC ${_neutron_sources})

‎backends/nxp/runtime/NeutronBackend.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ typedef struct {
111111
// Neutron compute has no access to FLASH.
112112
// Prefetch weights from FLASH to SRAM using memcpy.
113113
// For a model converted with --fetch_constants_to_sram.
114-
void copy(void* dst, const void* src, uint32_t size, uint32_t channel) {
114+
// cppcheck-suppress constParameterCallback
115+
void copy(void* dst, void* src, uint32_t size, uint32_t channel) {
115116
memcpy(dst, src, size);
116117
}
117118
void wait(uint32_t channel) {}

0 commit comments

Comments
 (0)