Skip to content

[QNN EP] Enable QnnGpu backend in QNN EP. #24435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

johnpaultaken
Copy link
Contributor

Description

Enable the GPU backend also for the onnxruntime QNN EP.

Motivation and Context

Why is this change required? What problem does it solve?
It allows QNN EP to run on the GPU backend also.
With this change many models can now run fully on QNN EP GPU backend, like resnet_50, google_vit_base_fp32, squeezenet1.0-7 etc. Also the onnxruntime node tests and versioned operator tests pass numbers for the GPU is comparable to the HTP now.
Note: Currently QNN_LOG_LEVEL_DEBUG need to be enabled to run correctly.

@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Apr 15, 2025
@HectorSVC
Copy link
Contributor

/azp run Linux QNN CI Pipeline,Windows x64 QNN CI Pipeline,Windows ARM64 QNN CI Pipeline,Linux Android Emulator QNN CI Pipeline

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

Description
Enable the GPU backend also for the onnxruntime QNN EP.

Motivation and Context
Why is this change required? What problem does it solve?
It allows QNN EP to run on the GPU backend also.
With this change many models can now run fully on QNN EP GPU backend, like resnet_50, google_vit_base_fp32, squeezenet1.0-7 etc.
Also the onnxruntime node tests and versioned operator tests pass numbers for the GPU is comparable to the HTP now.
Note: Currently QNN_LOG_LEVEL_DEBUG need to be enabled to run correctly.
@johnpaultaken johnpaultaken force-pushed the dev/qualcomm/johnpaul/enable_qnn_gpu branch from ce75ea8 to 5cdbae7 Compare April 15, 2025 23:48
@HectorSVC
Copy link
Contributor

/azp run Big Models,Linux Android Emulator QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows CPU CI Pipeline,Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows GPU TensorRT CI Pipeline,Windows x64 QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI

@HectorSVC
Copy link
Contributor

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, Linux QNN CI Pipeline,Linux OpenVINO CI Pipeline

Copy link
Contributor

@HectorSVC HectorSVC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@johnpaultaken
Copy link
Contributor Author

/azp run Windows GPU Doc Gen CI Pipeline

Copy link

Commenter does not have sufficient privileges for PR 24435 in repo microsoft/onnxruntime

@johnpaultaken
Copy link
Contributor Author

johnpaultaken commented Apr 16, 2025

@HectorSVC Windows GPU doc gen failure looks like a network issue. If it is a required pass, can you rerun please.
Raw logs show this:
ERR:write EPROTO 5C030000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1590:SSL alert number 80

In fact, all the pipeline failures looks unrelated to this change.
Please let me know if you think otherwise.

@HectorSVC HectorSVC merged commit b4b5a79 into microsoft:main Apr 16, 2025
68 of 76 checks passed
adrianlizarraga added a commit that referenced this pull request Apr 21, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
### Description
Excludes QnnGpu.dll from Windows x64 NuGet package because it is not
available for that architecture.



### Motivation and Context
Fix failure in QNN packaging pipeline:
```shell
CreateNativePackage:
  Generating nuspec for the native Microsoft.ML.OnnxRuntime.QNN nuget package...
  python ..\tools\nuget\generate_nuspec_for_native_nuget.py --package_version 1.22.0-dev-20250421-0439-2abab8d --package_name Microsoft.ML.OnnxRuntime.QNN --target_architecture x64 --build_config RelWithDebInfo --native_build_path D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo --packages_path D:\a\_work\1\b\packages --ort_build_path D:\a\_work\1\b --sources_path D:\a\_work\1\s --commit_id 2abab8d --is_release_build False --execution_provider None --nuspec_name NativeNuget.nuspec
          1 file(s) copied.
          1 file(s) copied.
  nuspec_name: NativeNuget.nuspec
  Bundling native shared library artifacts into Microsoft.ML.OnnxRuntime nuget package...
  nuget pack NativeNuget.nuspec
  Attempting to build package from 'NativeNuget.nuspec'.
##[error]EXEC(0,0): Error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'.
EXEC : error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'. [D:\a\_work\1\s\csharp\OnnxRuntime.CSharp.proj]
##[error]csharp\OnnxRuntime.CSharp.proj(109,5): Error MSB3073: The command "nuget pack NativeNuget.nuspec" exited with code 1.
```

Introduced by this PR:
#24435
ashrit-ms pushed a commit that referenced this pull request Apr 24, 2025
### Description
Enable the GPU backend also for the onnxruntime QNN EP.

### Motivation and Context
Why is this change required? What problem does it solve? 
It allows QNN EP to run on the GPU backend also.
With this change many models can now run fully on QNN EP GPU backend, like resnet_50, google_vit_base_fp32, squeezenet1.0-7 etc. Also the onnxruntime node tests and versioned operator tests pass numbers for the GPU is comparable to the HTP now.
Note: Currently QNN_LOG_LEVEL_DEBUG need to be enabled to run correctly.
intbf pushed a commit to intbf/onnxruntime that referenced this pull request Apr 25, 2025
### Description
Excludes QnnGpu.dll from Windows x64 NuGet package because it is not
available for that architecture.

### Motivation and Context
Fix failure in QNN packaging pipeline:
```shell
CreateNativePackage:
  Generating nuspec for the native Microsoft.ML.OnnxRuntime.QNN nuget package...
  python ..\tools\nuget\generate_nuspec_for_native_nuget.py --package_version 1.22.0-dev-20250421-0439-2abab8d --package_name Microsoft.ML.OnnxRuntime.QNN --target_architecture x64 --build_config RelWithDebInfo --native_build_path D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo --packages_path D:\a\_work\1\b\packages --ort_build_path D:\a\_work\1\b --sources_path D:\a\_work\1\s --commit_id 2abab8d --is_release_build False --execution_provider None --nuspec_name NativeNuget.nuspec
          1 file(s) copied.
          1 file(s) copied.
  nuspec_name: NativeNuget.nuspec
  Bundling native shared library artifacts into Microsoft.ML.OnnxRuntime nuget package...
  nuget pack NativeNuget.nuspec
  Attempting to build package from 'NativeNuget.nuspec'.
##[error]EXEC(0,0): Error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'.
EXEC : error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'. [D:\a\_work\1\s\csharp\OnnxRuntime.CSharp.proj]
##[error]csharp\OnnxRuntime.CSharp.proj(109,5): Error MSB3073: The command "nuget pack NativeNuget.nuspec" exited with code 1.
```

Introduced by this PR:
microsoft#24435

Signed-off-by: bfilipek <bartlomiej.filipek@intel.com>
vraspar pushed a commit that referenced this pull request Apr 28, 2025
### Description
Excludes QnnGpu.dll from Windows x64 NuGet package because it is not
available for that architecture.



### Motivation and Context
Fix failure in QNN packaging pipeline:
```shell
CreateNativePackage:
  Generating nuspec for the native Microsoft.ML.OnnxRuntime.QNN nuget package...
  python ..\tools\nuget\generate_nuspec_for_native_nuget.py --package_version 1.22.0-dev-20250421-0439-2abab8d --package_name Microsoft.ML.OnnxRuntime.QNN --target_architecture x64 --build_config RelWithDebInfo --native_build_path D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo --packages_path D:\a\_work\1\b\packages --ort_build_path D:\a\_work\1\b --sources_path D:\a\_work\1\s --commit_id 2abab8d --is_release_build False --execution_provider None --nuspec_name NativeNuget.nuspec
          1 file(s) copied.
          1 file(s) copied.
  nuspec_name: NativeNuget.nuspec
  Bundling native shared library artifacts into Microsoft.ML.OnnxRuntime nuget package...
  nuget pack NativeNuget.nuspec
  Attempting to build package from 'NativeNuget.nuspec'.
##[error]EXEC(0,0): Error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'.
EXEC : error NU5019: File not found: 'D:\a\_work\1\b\RelWithDebInfo\RelWithDebInfo\QnnGpu.dll'. [D:\a\_work\1\s\csharp\OnnxRuntime.CSharp.proj]
##[error]csharp\OnnxRuntime.CSharp.proj(109,5): Error MSB3073: The command "nuget pack NativeNuget.nuspec" exited with code 1.
```

Introduced by this PR:
#24435
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.

None yet

2 participants