MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SetNumThreads

Method SetNumThreads

tensorflow/lite/interpreter.cc:241–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239void Interpreter::UseNNAPI(bool enable) { primary_subgraph().UseNNAPI(enable); }
240
241void 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
254void Interpreter::SetAllowFp16PrecisionForFp32(bool allow) {
255 for (auto& subgraph : subgraphs_) {

Callers 2

operator()Method · 0.45
TEST_FFunction · 0.45

Calls 1

contextMethod · 0.45

Tested by 1

TEST_FFunction · 0.36