Skip to content

[QNN-EP] Add GPU to QNN EP factory - #26085

Merged
HectorSVC merged 1 commit into
microsoft:mainfrom
CodeLinaro:dev/mattsinc/enable-gpu-in-qnn-factory
Sep 19, 2025
Merged

[QNN-EP] Add GPU to QNN EP factory#26085
HectorSVC merged 1 commit into
microsoft:mainfrom
CodeLinaro:dev/mattsinc/enable-gpu-in-qnn-factory

Conversation

@qti-mattsinc

Copy link
Copy Markdown
Contributor

Description

Make the GPU backend visible to users of the WinML API.

The V2 EP selection mechanism will now expose the GPU device for QNN. The GPU can be picked when:

  • The device list contains only GPU
  • The execution policy is set to PREFER_GPU

If multiple devices (e.g. HTP and GPU) are provided to AppendExecutionProviders_V2, whichever device was provided last in the list will be used.

Motivation and Context

Required to enable WinML usage with the QNN GPU backend

@johnpaultaken

Copy link
Copy Markdown
Contributor

@adrianlizarraga @HectorSVC This is the GPU enablement for V2 EP selection that I mentioned in last weeks meeting. Please approve. Thanks.

@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Sep 18, 2025
@HectorSVC

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@qti-mattsinc
qti-mattsinc force-pushed the dev/mattsinc/enable-gpu-in-qnn-factory branch from 810c0e0 to d4c11fc Compare September 18, 2025 22:23
@qti-mattsinc

Copy link
Copy Markdown
Contributor Author

CI was failing for one of the added autoep tests. Looks like the CI environment does not have the appropriate hardware for running tests on QNN HTP / GPU (judging from default_providers.cc:L253 and from all the Qnn{HTP,GPU}BackendTests skipping), so I've removed it.

- Enables the GPU backend to be picked up through WinML
@qti-mattsinc
qti-mattsinc force-pushed the dev/mattsinc/enable-gpu-in-qnn-factory branch from d4c11fc to 220fc7d Compare September 18, 2025 22:30
@HectorSVC

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@HectorSVC
HectorSVC merged commit a7ae9ae into microsoft:main Sep 19, 2025
84 of 85 checks passed
fs-eire pushed a commit that referenced this pull request Oct 24, 2025
## Description

Make the GPU backend visible to users of the WinML API.

The V2 EP selection mechanism will now expose the GPU device for QNN.
The GPU can be picked when:

* The device list contains only GPU
* The execution policy is set to PREFER_GPU

If multiple devices (e.g. HTP and GPU) are provided to `AppendExecutionProviders_V2`, whichever device was provided last in the list will be used.

## Motivation and Context
Required to enable WinML usage with the QNN GPU backend
naomiOvad pushed a commit to naomiOvad/onnxruntime that referenced this pull request Nov 2, 2025
## Description

Make the GPU backend visible to users of the WinML API.

The V2 EP selection mechanism will now expose the GPU device for QNN.
The GPU can be picked when:

* The device list contains only GPU
* The execution policy is set to PREFER_GPU

If multiple devices (e.g. HTP and GPU) are provided to `AppendExecutionProviders_V2`, whichever device was provided last in the list will be used.

## Motivation and Context
Required to enable WinML usage with the QNN GPU backend
jaholme pushed a commit that referenced this pull request Nov 13, 2025
## Description

Make the GPU backend visible to users of the WinML API.

The V2 EP selection mechanism will now expose the GPU device for QNN.
The GPU can be picked when:

* The device list contains only GPU
* The execution policy is set to PREFER_GPU

If multiple devices (e.g. HTP and GPU) are provided to `AppendExecutionProviders_V2`, whichever device was provided last in the list will be used.

## Motivation and Context
Required to enable WinML usage with the QNN GPU backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:QNN issues related to QNN exeution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants