onnxruntime/onnxruntime/test/shared_lib
Edward Chen 04030f64be
Add QNN EP HTP shared memory allocator (#23136)
Adds QNN EP HTP shared memory allocator.

The HTP shared memory allocator (`HtpSharedMemoryAllocator`) calls the
rpcmem shared library (libcdsprpc.so/dll) to allocate and free memory
that can be shared between HTP and CPU.

The allocator can be enabled by setting QNN EP option
`enable_htp_shared_memory_allocator` to `1`.
`QNNExecutionProvider::CreatePreferredAllocators()` will then return an
instance of `HtpSharedMemoryAllocator`.

For each QNN context, we also need to register and unregister memory
handles in order to use the HTP shared memory. This memory handle
management is added to `QnnBackendManager`, which also manages the QNN
context handles.

For more information about using HTP shared memory with QNN, see:
https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/htp_shared_buffer_tutorial.html#shared-buffer-tutorial

Limitations:
- HTP shared memory usage is only supported for graph inputs and
outputs. Intermediate values are not supported.
- An allocation is assigned to a single shared memory buffer. The
allocator is not smart enough to have multiple allocations share a
single shared memory buffer.

Co-authored-by: Baiju Meswani <bmeswani@microsoft.com>
2025-01-14 11:09:50 -08:00
..
cuda_ops.cu
custom_op_utils.cc Create a new C API KernelContext_GetAllocator() for Custom Op scenario (#15591) 2023-04-23 21:54:35 -07:00
custom_op_utils.h Update ruff and clang-format versions (#21479) 2024-07-24 11:50:11 -07:00
fns_candy_style_transfer.c
onnx_protobuf.h
rocm_ops.hip EP context for custom op (#16454) 2023-08-16 13:03:40 -07:00
test_allocator.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_fixture.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_inference.cc Add QNN EP HTP shared memory allocator (#23136) 2025-01-14 11:09:50 -08:00
test_io_types.cc Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
test_model_loading.cc Remove references to the outdated CUDA EP factory method (#21549) 2024-07-29 21:59:16 -07:00
test_nontensor_types.cc Enable Ort objects to be stored in a resizable std::vector (#22608) 2024-10-29 09:59:59 -07:00
test_ort_format_models.cc Enable Address Sanitizer in CI (#19073) 2024-01-12 07:24:40 -08:00
test_run_options.cc
test_session_options.cc Add new SessionOptions config entry to disable specific transformers and rules (#20135) 2024-04-02 16:33:05 -07:00
utils.cc
utils.h