From 59c1968cbcad1ad0eba0998592eff24fa79abee5 Mon Sep 17 00:00:00 2001 From: Chen Lai Date: Fri, 3 May 2024 13:00:54 -0700 Subject: [PATCH] fix the temp allocator for backend (#3490) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/3490 Seems like forget to pass temp allocator to `BackendExecutionContext`... Reviewed By: tarun292 Differential Revision: D56893727 fbshipit-source-id: 81bb1208a163220f9b4250493b06069e6329628e (cherry picked from commit 1fd80feff8f22479f650b53b10ad4aada49e9d71) --- runtime/executor/method.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/executor/method.cpp b/runtime/executor/method.cpp index 0a3a64a13c4..5945ee7de1d 100644 --- a/runtime/executor/method.cpp +++ b/runtime/executor/method.cpp @@ -1060,7 +1060,9 @@ Error Method::execute_instruction() { delegate_idx, n_delegate_, step_state_.instr_idx); - BackendExecutionContext backend_execution_context(event_tracer_); + BackendExecutionContext backend_execution_context( + /*event_tracer*/ event_tracer_, + /*temp_allocator*/ memory_manager_->temp_allocator()); err = delegates_[delegate_idx].Execute( backend_execution_context, chain.argument_lists_[step_state_.instr_idx].data());