MCPcopy Create free account
hub / github.com/ARM-software/armnn / SelectNumberOfThreads

Function SelectNumberOfThreads

src/armnn/Sme2ShapePolicy.cpp:412–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412unsigned int SelectNumberOfThreads(const Sme2ShapeProfile& profile, unsigned int requestedThreads)
413{
414 if (!profile.m_HasQuantized || ShouldDisableSme(profile))
415 {
416 return requestedThreads;
417 }
418
419 if (profile.m_GemmLikeOps == 0)
420 {
421 return CapWorkerCount(requestedThreads, 1);
422 }
423
424 if (profile.m_HasSegmentationShape || profile.m_HasStyleTransferShape)
425 {
426 return requestedThreads;
427 }
428
429 if (profile.m_HasPoseShape)
430 {
431 return CapWorkerCount(requestedThreads, 4);
432 }
433
434 return CapWorkerCount(requestedThreads, 1);
435}
436
437} // namespace
438

Callers 1

ApplySme2ShapePolicyFunction · 0.85

Calls 2

ShouldDisableSmeFunction · 0.85
CapWorkerCountFunction · 0.85

Tested by

no test coverage detected