From 748216149eda328c1bc317757acb1f571f7b65a9 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Sat, 17 May 2025 11:35:52 -0700 Subject: [PATCH 1/2] Remove fast scratch part for now Summary: Fix CI Differential Revision: D74939323 --- backends/arm/runtime/EthosUBackend.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/backends/arm/runtime/EthosUBackend.cpp b/backends/arm/runtime/EthosUBackend.cpp index 74d35b3e3d7..9ef96b2eaa0 100644 --- a/backends/arm/runtime/EthosUBackend.cpp +++ b/backends/arm/runtime/EthosUBackend.cpp @@ -189,8 +189,6 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface { // the end of the execution of the Ethos-U custom delegate char* ethosu_scratch = static_cast(temp_allocator->allocate(handles.scratch_data_size)); - extern size_t ethosu_fast_scratch_size; - extern unsigned char* ethosu_fast_scratch; ET_LOG( Debug, "EthosUBackend::execute: Running program data:\n cmd %p %zu\n weight %p %zu\n scratch %p %zu\n fast scratch %p %zu\n", @@ -200,8 +198,8 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface { handles.weight_data_size, ethosu_scratch, handles.scratch_data_size, - ethosu_fast_scratch, - ethosu_fast_scratch_size); + nullptr, + 0); // Write argument values (from EValue tensor) into Ethos-U scratch // TODO(MLETORCH-123): Optimise into direct write from Vela into the SRAM @@ -311,12 +309,11 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface { static_cast( reinterpret_cast((handles.weight_data))), static_cast(reinterpret_cast(ethosu_scratch)), - static_cast( - reinterpret_cast(ethosu_fast_scratch))}; + nullptr}; size_t bases_size[ETHOSU_NUM_BASE_ADDRS] = { handles.weight_data_size, handles.scratch_data_size, - ethosu_fast_scratch_size}; + 0}; int result = 0; EXECUTORCH_PROF_START( event_tracer, event_tracer_local_scope, "+EthosUBackend::execute()NPU"); From 116eaf2ca8480655ccabbb9877f7fa3a8c821d68 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Sat, 17 May 2025 13:29:57 -0700 Subject: [PATCH 2/2] Fix --- backends/arm/runtime/EthosUBackend.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backends/arm/runtime/EthosUBackend.cpp b/backends/arm/runtime/EthosUBackend.cpp index 9ef96b2eaa0..51ebb3742e1 100644 --- a/backends/arm/runtime/EthosUBackend.cpp +++ b/backends/arm/runtime/EthosUBackend.cpp @@ -309,11 +309,9 @@ class EthosUBackend final : public ::executorch::runtime::BackendInterface { static_cast( reinterpret_cast((handles.weight_data))), static_cast(reinterpret_cast(ethosu_scratch)), - nullptr}; - size_t bases_size[ETHOSU_NUM_BASE_ADDRS] = { - handles.weight_data_size, - handles.scratch_data_size, 0}; + size_t bases_size[ETHOSU_NUM_BASE_ADDRS] = { + handles.weight_data_size, handles.scratch_data_size, 0}; int result = 0; EXECUTORCH_PROF_START( event_tracer, event_tracer_local_scope, "+EthosUBackend::execute()NPU");