diff --git a/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc b/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc index 9114910ad73..d61d967b910 100644 --- a/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc +++ b/tensorflow/lite/tools/benchmark/benchmark_tflite_model.cc @@ -613,6 +613,7 @@ TfLiteStatus BenchmarkTfLiteModel::InitInterpreter() { std::unique_ptr cpu_backend_context( new tflite::CpuBackendContext()); cpu_backend_context->SetUseCaching(true); + cpu_backend_context->SetMaxNumThreads(num_threads); external_context_->set_internal_backend_context( std::move(cpu_backend_context)); interpreter_->SetExternalContext(kTfLiteCpuBackendContext,