onnxruntime/onnxruntime/test/shared_lib
Scott McKay 927bac0f86
Rework allocator sharing to work for multiple devices. (#11700)
* Rework allocator sharing to work for multiple devices.
* Update SessionState to not use allocator name in matching for consistency with IExecutionProvider. The name doesn't have any clear meaning (e.g. we use the same name for the per-thread allocator in the CUDA EP as the shared allocate there and in the TRT EP).
  * NOTE: this means we will have one allocator per OrtMemType+OrtDevice. 
* Reverse order when doing allocator setup in SessionState. This will result in the CPU and CUDA EPs allocators being preferred (they are the most configurable), and also means the per-thread CUDA allocator for default GPU memory will be used even when TRT is enabled. 
  * NOTE: Combined with the change to remove the allocator name from the key this will mean that if CUDA and TRT or ROCM and MIGraphX are both enabled the CUDA/ROCM per-thread allocator will be used to allocate GPU memory.  
* Use InsertAllocator instead of TryInsertAllocator. Each EP should be registered once, and we should only enter RegisterAllocator once, so the 'try' should not be required and would indicate an unexpected setup was involved. i.e. better to fail and figure out if we need to support that setup.
* Add some clarifying comments around how replace allocator works.
* Add unit testing for setup where EP has local allocator that may get out of sync with values in the IExecutionProvider base class.
* Fix invalid check of whether data is on CPU to use device info instead of allocator name.
2022-06-09 17:38:38 +10:00
..
cuda_ops.cu
custom_op_utils.cc APIs for custom op to invoke ort operator directly (#10713) 2022-05-03 14:16:30 -07:00
custom_op_utils.h APIs for custom op to invoke ort operator directly (#10713) 2022-05-03 14:16:30 -07:00
fns_candy_style_transfer.c
onnx_protobuf.h Update C++ Standard from 14 to 17 (#8041) 2021-06-25 14:08:01 -07:00
test_allocator.cc
test_fixture.h
test_inference.cc Rework allocator sharing to work for multiple devices. (#11700) 2022-06-09 17:38:38 +10:00
test_io_types.cc
test_model_loading.cc Provide an API to supply external initializers data from user buffers (#11109) 2022-04-07 12:21:53 -07:00
test_nontensor_types.cc Change some const to constexpr in unit tests code(#10002) 2021-12-10 12:26:59 -08:00
test_ort_format_models.cc Always enable ORT format model loading. (#9586) 2021-11-01 10:00:08 +10:00
test_run_options.cc
test_session_options.cc
utils.cc Enable CUDA provider option configuration for C# (#10188) 2022-01-06 11:03:14 -08:00
utils.h