| 239 | void Interpreter::UseNNAPI(bool enable) { primary_subgraph().UseNNAPI(enable); } |
| 240 | |
| 241 | void Interpreter::SetNumThreads(int num_threads) { |
| 242 | for (auto& subgraph : subgraphs_) { |
| 243 | subgraph->context()->recommended_num_threads = num_threads; |
| 244 | } |
| 245 | |
| 246 | for (int i = 0; i < kTfLiteMaxExternalContexts; ++i) { |
| 247 | auto* c = external_contexts_[i]; |
| 248 | if (c && c->Refresh) { |
| 249 | c->Refresh(context_); |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | void Interpreter::SetAllowFp16PrecisionForFp32(bool allow) { |
| 255 | for (auto& subgraph : subgraphs_) { |