onnxruntime/tools/ci_build/github/linux
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
..
docker Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
ort_minimal Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
python Update docker images: remove python 3.8 and 3.9 (#23310) 2025-01-10 13:09:04 -08:00
build_cuda_c_api_package.sh Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
build_cuda_ci.sh Move Linux GPU CI pipeline to A10 (#23235) 2025-01-04 19:11:37 -08:00
build_linux_python_package.sh [QNN EP] Make QNN EP a shared library (#23120) 2025-01-22 12:11:00 -08:00
build_rocm_c_api_package.sh Update copy_strip_binary.sh: use "make install" instead (#21464) 2024-07-24 10:02:00 -07:00
build_tensorrt_c_api_package.sh Update onnxruntime binary size checks ci pipeline's docker image (#23405) 2025-01-17 15:29:17 -08:00
build_tensorrt_ci.sh [TensorRT EP] New CIs to test TRT+minimal CUDA build (#23028) 2024-12-19 10:30:39 -08:00
build_yocto.sh
copy_strip_binary.sh Update copy_strip_binary.sh: use "make install" instead (#21464) 2024-07-24 10:02:00 -07:00
create_package.sh
delete_unused_files_before_upload.sh Update training packaging pipeline's docker files (#20853) 2024-05-30 23:48:42 -07:00
extract_and_bundle_gpu_package.sh
java_copy_strip_binary.sh
java_linux_final_test.sh
run_build.sh Fix a build issue: /MP was not enabled correctly (#19190) 2024-01-29 12:45:38 -08:00
run_dockerbuild.sh Cleanup code (#22827) 2024-11-19 14:13:33 -08:00
run_python_dockerbuild.sh Fix build for linux python wheel (#22801) 2024-11-11 15:20:07 -08:00
run_python_dockertest.sh
run_python_tests.sh Add python 3.13 support (#22380) 2024-10-14 18:07:54 -07:00
test_custom_ops_pytorch_export.sh Replace reference to python 3.8 with python 3.10 (#22692) 2024-11-07 16:51:40 -08:00
upload_code_coverage_data.sh Fix Android CI pipeline (#19877) 2024-03-13 10:09:43 -07:00
upload_ortsrv_binaries.sh
yocto_build_toolchain.sh