| 410 | } |
| 411 | |
| 412 | unsigned 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 |
no test coverage detected