onnxruntime/tools/ci_build
Tang, Cheng a81faee41e
Multi-stream execution support (#13495)
**Description**: This PR including following works:
1. provide stream and related synchronization abstractions in
onnxruntime.
2. enhance onnxruntime's execution planner / executor / memory arena to
support execute multiple streams in parallel.
3. deprecate the parallel executor for cpu.
4. deprecate the Fence mechanism. 
5. update the cuda / tensorrt EP to support the stream mechanism,
support running different request in different cuda stream.

**Motivation and Context**
- Why is this change required? 
currently, the execution plan is just a linear list of those primitives,
ort will execute them step by step. For any given graph, ORT will
serialize it to a fixed execution order. This sequential execution
design simplifies most scenarios, but it has the following limitations:
1. it is difficult to enable inter-node parallelization, we have a
half-baked parallel executor but it is very difficult to make it work
with GPU.
2. The fence mechanism can work with single gpu stream + cpu thread
case, but when extend to multiple stream, it is difficult to manage the
cross GPU stream synchronizations.
3. our cuda EP rely on the BFCArena to make the memory management work
with the GPU async kernels, but current BFCArena is not aware of the
streams, so it doesn't behavior correctly when run with multiple
streams.

This PR enhance our existing execution plan and executor to support
multiple stream execution. we use an unified algorithm to mange both
single stream and multiple stream scenarios.
This PR mainly focus on the infrastructure support for multiple stream
execution, that is said, given a valid stream assignment, onnxruntime
can execute it correctly. How to generate a good stream assignment for a
given model will be in the future PR.

Co-authored-by: Cheng Tang <chenta@microsoft.com@orttrainingdev9.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net>
Co-authored-by: Cheng Tang <chenta@microsoft.com>
Co-authored-by: RandySheriffH <48490400+RandySheriffH@users.noreply.github.com>
Co-authored-by: Randy Shuai <rashuai@microsoft.com>
Co-authored-by: cao lei <jslhcl@gmail.com>
Co-authored-by: Lei Cao <leca@microsoft.com>
2022-12-15 07:39:29 -08:00
..
github FIX: macOS CI pipeline doesn't run tests (#13970) 2022-12-14 18:39:31 -08:00
__init__.py
amd_hipify.py Multi-stream execution support (#13495) 2022-12-15 07:39:29 -08:00
build.py [TensorRT EP] support TensorRT 8.5 (#13867) 2022-12-14 13:06:03 -08:00
clean_docker_image_cache.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
coverage.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
gen_def.py Add CANN EP (#12416) 2022-09-22 14:53:40 -07:00
get_docker_image.py Improve dependency management (#13523) 2022-12-01 09:51:59 -08:00
logger.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
op_registration_utils.py Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
op_registration_validator.py Add ONNX LayerNormalization(17) (#12978) 2022-09-23 09:49:27 +10:00
policheck_exclusions.xml Exculde hipify option from policheck (#13431) 2022-10-25 16:35:16 +08:00
reduce_op_kernels.py Update kernel matching logic: decouple from op schemas and remove kernel def hashes (#12791) 2022-09-20 14:24:59 -07:00
replace_urls_in_deps.py Move C/C++ deps' URLs to deps.txt (#13769) 2022-11-29 18:06:35 -08:00
requirements.txt Bump protobuf from 3.17.0 to 3.18.3 in /tools/ci_build 2022-09-25 20:00:36 -07:00
update_tsaoptions.py Add license header to some files. (#13074) 2022-09-23 18:46:02 -07:00
upload_python_package_to_azure_storage.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00