pytorch / pytorch/executorch

want to set npu cores and select npu cores used

Open
#16,762 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: qnn partner: qualcomm triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🚀 The feature, motivation and pitch

Feature:

Configurable NPU Core Allocation for Qualcomm SoCs

Motivation:

I am working on optimizing AI inference performance on Qualcomm SoCs (e.g., SA8797 with 4 NPU cores) and need fine-grained control over NPU resource allocation. The current limitation is the inability to specify the exact number of NPU cores to be used during model compilation and subsequently select which specific cores are utilized during runtime inference. This feature is essential for:

Performance Optimization:​ Allowing developers to reserve specific cores for different AI models or tasks, enabling efficient multi-model pipelining and avoiding resource contention.

Power Efficiency:​ Providing the ability to use only the necessary number of cores for a given workload, reducing power consumption for less demanding models.

Deterministic Behavior:​ Ensuring predictable performance by pinning inference tasks to dedicated hardware resources, which is critical for real-time applications.

Pitch:

I propose adding a configuration option to specify the number of NPU cores to be used during the model compilation phase. Furthermore, during the inference execution phase, an API or mechanism should be provided to allow developers to explicitly select which specific NPU cores (e.g., Core 0, Core 2) are utilized for the inference task. This will enable precise control over hardware resource allocation, leading to improved performance, power efficiency, and system stability for AI workloads on Qualcomm platforms.

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the Qualcomm NPU compilation and runtime integration, then clarify the supported SoCs and API boundaries; done requires configurable core counts during compilation and explicit core selection during inference.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, machine-learning, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.