benchmark_model provides thread number to CpuBackendContext when using caching
PiperOrigin-RevId: 316135815 Change-Id: Id044cdc4a627d881b2e4b84ded696f488f7de6a8
This commit is contained in:
parent
76e45e9c05
commit
b1be337088
@ -613,6 +613,7 @@ TfLiteStatus BenchmarkTfLiteModel::InitInterpreter() {
|
||||
std::unique_ptr<tflite::CpuBackendContext> 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,
|
||||
|
Loading…
Reference in New Issue
Block a user