onnxruntime/tools/ci_build/github/azure-pipelines
Adrian Lizarraga 3b4c7df4e9
[QNN EP] Make QNN EP a shared library (#23120)
### Description
- Makes QNN EP a shared library **by default** when building with
`--use_qnn` or `--use_qnn shared_lib`. Generates the following build
artifacts:
- **Windows**: `onnxruntime_providers_qnn.dll` and
`onnxruntime_providers_shared.dll`
- **Linux**: `libonnxruntime_providers_qnn.so` and
`libonnxruntime_providers_shared.so`
  - **Android**: Not supported. Must build QNN EP as a static library.
- Allows QNN EP to still be built as a static library with `--use_qnn
static_lib`. This is primarily for the Android QNN AAR package.
- Unit tests run for both the static and shared QNN EP builds.

### Detailed changes
- Updates Java bindings to support both shared and static QNN EP builds.
- Provider bridge API:
- Adds logging sink ETW to the provider bridge. Allows EPs to register
ETW callbacks for ORT logging.
- Adds a variety of methods for onnxruntime objects that are needed by
QNN EP.
- QNN EP:
- Adds `ort_api.h` and `ort_api.cc` that encapsulates the API provided
by ORT in a manner that allows the EP to be built as either a shared or
static library.
- Adds custom function to transpose weights for Conv and Gemm (instead
of adding util to provider bridge API).
- Adds custom function to quantize data for LeakyRelu (instead of adding
util to provider bridge API).
  - Adds custom ETW tracing for QNN profiling events:
    - shared library: defines its own TraceLogging provider handle
- static library: uses ORT's TraceLogging provider handle and existing
telemetry provider.
- ORT-QNN Packages:
- **Python**: Pipelines build QNN EP as a shared library by default.
User can build a local python wheel with QNN EP as a static library by
passing `--use_qnn static_lib`.
- **NuGet**: Pipelines build QNN EP as a shared library by default.
`build.py` currently enforces QNN EP to be built as a shared library.
Can add support for building a QNN NuGet package with static later if
deemed necessary.
- **Android**: Pipelines build QNN EP as a **static library**.
`build.py` enforces QNN EP to be built as a static library. Packaging
multiple shared libraries into an Android AAR package is not currently
supported due to the added need to also distribute a shared libcpp.so
library.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2025-01-22 12:11:00 -08:00
..
nodejs/templates
nuget Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
stages Moving RN_CI Android Testing to Linux (#23422) 2025-01-21 11:55:29 -08:00
templates [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00
triggers
android-arm64-v8a-QNN-crosscompile-ci-pipeline.yml [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00
android-x86_64-crosscompile-ci-pipeline.yml
bigmodels-ci-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
binary-size-checks-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
build-perf-test-binaries-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
c-api-noopenmp-packaging-pipelines.yml Update Qnn SDK default version to 2.30 (#23411) 2025-01-17 22:36:35 -08:00
c-api-training-packaging-pipelines.yml
cuda-packaging-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
linux-ci-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
linux-cpu-minimal-build-ci-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
linux-dnnl-ci-pipeline.yml Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
linux-gpu-ci-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
linux-gpu-tensorrt-ci-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
linux-gpu-tensorrt-cuda-minimal-ci-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
linux-gpu-tensorrt-daily-perf-pipeline.yml [TensorRT EP] support TensorRT 10.7-GA (#23011) 2024-12-19 10:39:15 -08:00
linux-migraphx-ci-pipeline.yml Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
linux-openvino-ci-pipeline.yml OVEP 1.21.0 Development Updates (#23080) 2024-12-11 22:26:32 -08:00
linux-qnn-ci-pipeline.yml [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00
linux-rocm-ci-pipeline.yml Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
mac-ci-pipeline.yml
mac-coreml-ci-pipeline.yml
mac-ios-ci-pipeline.yml Update min iOS version to 15.1 to align with React Native 0.76 (#23292) 2025-01-08 16:02:45 -08:00
mac-ios-packaging-pipeline.yml
mac-react-native-ci-pipeline.yml Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
npm-packaging-pipeline.yml Seperate RN andriod and IOS into 2 separated Stages. (#23400) 2025-01-20 18:08:01 -08:00
nuget-cuda-publishing-pipeline.yml
nuget-windows-ai.yml Nuget Windows AI Pipeline, Disable SDL Submodules. (#22711) 2024-11-04 08:39:28 -08:00
post-merge-jobs.yml Merge web machine pools (#23243) 2025-01-03 13:53:17 -08:00
publish-nuget.yml
py-cuda-alt-package-test-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
py-cuda-alt-packaging-pipeline.yml Update Python-Cuda-Publishing-Pipeline (#23253) 2025-01-06 11:50:58 -08:00
py-cuda-package-test-pipeline.yml Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
py-cuda-packaging-pipeline.yml Update Python-Cuda-Publishing-Pipeline (#23253) 2025-01-06 11:50:58 -08:00
py-cuda-publishing-pipeline.yml Update Python-Cuda-Publishing-Pipeline (#23253) 2025-01-06 11:50:58 -08:00
py-dml-packaging-pipeline.yml Add pipauth to more ADO pipelines and enable CSV (#22612) 2024-10-28 16:39:22 -07:00
py-package-test-pipeline.yml Adding new Python package testing pipeline for Cuda Alt (#22584) 2024-10-24 19:24:53 -07:00
py-packaging-pipeline.yml Update Qnn SDK default version to 2.30 (#23411) 2025-01-17 22:36:35 -08:00
qnn-ep-nuget-packaging-pipeline.yml Update Qnn SDK default version to 2.30 (#23411) 2025-01-17 22:36:35 -08:00
rocm-nuget-packaging-pipeline.yml Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
rocm-publish-nuget-pipeline.yml New rocm nuget publish pipeline (#22418) 2024-10-13 08:30:06 +08:00
web-ci-pipeline.yml Merge web machine pools (#23243) 2025-01-03 13:53:17 -08:00
win-ci-fuzz-testing.yml Remove PostBuildCleanup (#23233) 2024-12-31 13:12:33 -08:00
win-ci-pipeline.yml Remove training pipelines from Win CPI CI as redundant (#22190) 2024-09-23 18:15:41 -07:00
win-gpu-cuda-ci-pipeline.yml Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
win-gpu-dml-ci-pipeline.yml Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
win-gpu-doc-gen-ci-pipeline.yml
win-gpu-reduce-op-ci-pipeline.yml
win-gpu-tensorrt-ci-pipeline.yml [TensorRT EP] Refactor TRT version update logic & apply TRT 10.5 (#22483) 2024-10-29 09:23:41 -07:00
win-gpu-tensorrt-cuda-minimal-ci-pipeline.yml [TensorRT EP] New CIs to test TRT+minimal CUDA build (#23028) 2024-12-19 10:30:39 -08:00
win-gpu-training-ci-pipeline.yml
win-gpu-webgpu-ci-pipeline.yml Fix delay load for WebGPU EP and DML EP (#23111) 2024-12-19 10:23:48 -08:00
win-qnn-arm64-ci-pipeline.yml [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00
win-qnn-ci-pipeline.yml [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00