onnxruntime/onnxruntime/test/framework
Tim Harris 5e8952ef89
ThreadPool clean up : mm_pause in loops, correctly spin-then-wait, and adopt static methods consistently in the API (#5590)
Description: This change makes three changes to the ThreadPool class to clean up issues identified during performance analysis and optimization. (1) It uses mm_pause intrinsics in spin loops, helping avoid consuming pipeline resources while waiting. (2) It re-organizes the spin-then-steal loop for work distribution to start out spinning as intended, rather than to start out trying to steal. (3) It updates the ThreadPool class's API to be consistent in the use of static methods for public functions. The PR includes minor doc updates and corresponding changes to test cases.

Motivation and Context
The change helps ensure consistency in behavior between the OpenMP and Eigen-based implementations. Unlike the instance methods, the static methods abstract over the different ways in which threading can be implemented; they will map onto the OpenMP or Eigen-based implementations when threading is used. When threading is not used they will run work sequentially.
2020-10-28 09:49:18 +00:00
..
cuda Rename DeviceAllocatorRegistrationInfo to a more generic name; Use OrtArenaCfg for arena members; Remove unused OrtMemType; Simplify CreateAllocator interface. (#4970) 2020-09-01 09:25:32 -07:00
allocation_planner_test.cc [ORT Mobile] file format schema and file I/O code (#4973) 2020-09-01 11:51:31 +10:00
allocator_test.cc Reduce ONNX dependency in minimal build (#4890) 2020-08-23 07:02:13 +10:00
bfc_arena_test.cc Remove IDeviceAllocator class as it doesn't extend IAllocator in any way. (#5067) 2020-09-10 00:46:35 -07:00
data_types_test.cc Add iOS test pipeline and a sample app. (#5298) 2020-09-29 13:53:11 -07:00
debug_node_inputs_outputs_utils_test.cc GatherGrad optimization (#5524) 2020-10-26 12:53:53 -07:00
distance_test.cc Fixes GTest deprecation warnings 2020-03-17 16:38:55 -07:00
dummy_allocator.cc Move memory info into IAllocator (#2850) 2020-06-22 11:18:52 +10:00
dummy_allocator.h Move memory info into IAllocator (#2850) 2020-06-22 11:18:52 +10:00
dummy_provider.cc
dummy_provider.h Replace GSL with GSL-LITE submodule and fix up refs (#1920) 2019-10-01 12:43:29 -07:00
endian_test.cc Edgchen1/endian utils (#2181) 2019-10-21 22:28:35 -07:00
execution_frame_test.cc Cleanup some test infrastructure (#5484) 2020-10-16 06:44:01 +10:00
float_16_test.cc Add support for sessions to share a global threadpool. (#3177) 2020-03-18 15:42:46 -07:00
inference_session_test.cc ThreadPool clean up : mm_pause in loops, correctly spin-then-wait, and adopt static methods consistently in the API (#5590) 2020-10-28 09:49:18 +00:00
insert_cast_transformer_test.cc Remove Useless Cast from Contiguous Cast Nodes (#5204) 2020-09-29 09:18:52 +08:00
kernel_registry_test.cc Fix kernel registry validation to reenable DML kernels 2019-12-02 15:43:44 -08:00
local_kernel_registry_test.cc Add support for sessions to share a global threadpool. (#3177) 2020-03-18 15:42:46 -07:00
math_test.cc Threadpool related changes. (#3564) 2020-04-21 09:57:39 -07:00
mem_pattern_planner_test.cc Fix some warnings on Windows (#2560) 2020-01-22 15:59:11 -08:00
memcpy_transformer_test.cc Fix static analysis warnings found by VC++ (#3530) 2020-04-16 01:46:47 -07:00
model_builder_utils.h
opaque_kernels_test.cc Add support for sessions to share a global threadpool. (#3177) 2020-03-18 15:42:46 -07:00
ort_model_only_test.cc Support for Sparse Initializers (#5540) 2020-10-27 10:32:06 -07:00
parallel_executor_test.cc Thread pool changes (#3153) 2020-03-30 12:18:40 -07:00
random_test.cc Add Python API to set random seed: onnxruntime.seed(<seed>) 2020-04-15 09:44:48 -07:00
session_state_test.cc Enable prepacking in subgraph (#5433) 2020-10-26 22:22:31 -07:00
shape_inference_test.cc Avoid using the default logger in the graph lib and optimizers (#2361) 2019-11-14 13:23:28 -08:00
sparse_kernels_test.cc Support for Sparse Initializers (#5540) 2020-10-27 10:32:06 -07:00
tensor_test.cc Various armv7 related fixes (#5394) 2020-10-09 22:34:32 +10:00
tensorutils_test.cc Constant-12 support (#3304) 2020-03-30 23:13:52 -07:00
test_main.cc Add option ORT_NO_EXCEPTIONS to disable most exception/throw in /onnxruntime/ (#4894) 2020-08-28 23:03:51 -07:00
test_tensor_loader.cc CMake changes (#2961) 2020-02-03 19:33:14 -08:00
test_utils.cc Cleanup some test infrastructure (#5484) 2020-10-16 06:44:01 +10:00
test_utils.h Allow sharing of initializers between sessions. (#5092) 2020-09-21 14:09:37 -07:00
TestAllocatorManager.cc Remove IDeviceAllocator class as it doesn't extend IAllocator in any way. (#5067) 2020-09-10 00:46:35 -07:00
TestAllocatorManager.h