mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-20 02:07:56 +00:00
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> |
||
|---|---|---|
| .. | ||
| cuda_ops.cu | ||
| custom_op_utils.cc | ||
| custom_op_utils.h | ||
| fns_candy_style_transfer.c | ||
| onnx_protobuf.h | ||
| rocm_ops.hip | ||
| test_allocator.cc | ||
| test_fixture.h | ||
| test_inference.cc | ||
| test_io_types.cc | ||
| test_model_loading.cc | ||
| test_nontensor_types.cc | ||
| test_ort_format_models.cc | ||
| test_run_options.cc | ||
| test_session_options.cc | ||
| utils.cc | ||
| utils.h | ||