onnxruntime/cmake
Yuhong Guo 04a8f50674
New configuration to limit the arena extension (#15983)
Add a configuration `max_power_of_two_extend_bytes ` to limit the arena extension size.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
In our real scenario, we observe that if the model is big enough the
BfcArena will extend uncontrollable.
As showed by the following figures, if a model uses more than 16GB
memory, the BfcArena will totally apply for 32GB memory according to the
`kNextPowerOfTwo` strategy. With the new strategy, the extension is
limited. The default maximum extension size is 1GB.

#### Without the new configuration
After loading the model, ORT uses 32G GPU memory.

![image](https://github.com/microsoft/onnxruntime/assets/19584326/42b93c66-b957-4f20-a13b-d34cb390afff)

#### With the new configuration
After loading the model, ORT uses 23G GPU memory.

![image](https://github.com/microsoft/onnxruntime/assets/19584326/5abffeff-9ca3-4187-a262-37fd2764fe1b)

Co-authored-by: Yuhong Guo <yuhong.gyh@antgroup.com>
2023-05-25 02:19:07 -07:00
..
external [DML EP] Fix issue with --dml_path build option (#15972) 2023-05-24 19:20:40 -05:00
patches FlatBuffers fails to compile with gcc13. (#15787) 2023-05-11 11:20:19 -07:00
tensorboard
adjust_global_compile_flags.cmake Cleanup WASM cmake code (#15996) 2023-05-20 18:07:39 -07:00
CMakeLists.txt New configuration to limit the arena extension (#15983) 2023-05-25 02:19:07 -07:00
CMakeSettings.json
codeconv.runsettings
deps.txt Implement openAI endpoint invoker for nuget (#15797) 2023-05-11 22:04:02 -07:00
EnableVisualStudioCodeAnalysis.props
gdk_toolchain.cmake
Info.plist.in
libonnxruntime.pc.cmake.in
nuget_helpers.cmake
onnxruntime.cmake Cleanup WASM cmake code (#15996) 2023-05-20 18:07:39 -07:00
onnxruntime_codegen_tvm.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
onnxruntime_common.cmake Cleanup WASM cmake code (#15996) 2023-05-20 18:07:39 -07:00
onnxruntime_compile_triton_kernel.cmake integrate triton into ort (#15862) 2023-05-17 09:35:28 +08:00
onnxruntime_config.h.in Adust GetVersionString() GetBuildInfoString() signatures and move them to OrtApi (#15921) 2023-05-13 13:45:07 -07:00
onnxruntime_csharp.cmake Refactor training build options (#13964) 2023-01-03 13:28:16 -08:00
onnxruntime_flatbuffers.cmake Rework some external targets to ease building with -DFETCHCONTENT_FULLY_DISCONNECTED=ON (#15323) 2023-04-03 17:45:12 -07:00
onnxruntime_framework.cmake Fix python pipeline for AzureEP without using root (#16023) 2023-05-22 16:38:47 -07:00
onnxruntime_fuzz_test.cmake Fix fuzz test (#14385) 2023-01-22 22:17:43 -08:00
onnxruntime_graph.cmake Create dedicated build for training api (#14136) 2023-01-10 20:58:04 -08:00
onnxruntime_ios.toolchain.cmake
onnxruntime_java.cmake Update build option for training in java to enable_training_api (#15638) 2023-04-24 11:53:08 -07:00
onnxruntime_java_unittests.cmake Update build option for training in java to enable_training_api (#15638) 2023-04-24 11:53:08 -07:00
onnxruntime_kernel_explorer.cmake [ROCm] add hipblaslt into GemmFastGelu TunableOp (#15945) 2023-05-23 11:07:09 +08:00
onnxruntime_language_interop_ops.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
onnxruntime_mlas.cmake Cleanup WASM cmake code (#15996) 2023-05-20 18:07:39 -07:00
onnxruntime_nodejs.cmake [js] upgrade dependencies and enable strict mode (#14930) 2023-03-22 15:05:04 -07:00
onnxruntime_objectivec.cmake Add iOS Swift Package Manager support (#15297) 2023-04-20 16:18:35 +10:00
onnxruntime_opschema_lib.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
onnxruntime_optimizer.cmake Optimize SCE loss compute (#15401) 2023-04-13 13:02:12 +08:00
onnxruntime_providers.cmake Cleanup WASM cmake code (#15996) 2023-05-20 18:07:39 -07:00
onnxruntime_pyop.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
onnxruntime_python.cmake [DML EP] Fix issue with --dml_path build option (#15972) 2023-05-24 19:20:40 -05:00
onnxruntime_rocm_hipify.cmake [ROCm] add beam search support (#15625) 2023-04-26 17:53:33 +08:00
onnxruntime_session.cmake fix headers for training apis (#14350) 2023-01-19 10:26:53 -08:00
onnxruntime_snpe_provider.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
onnxruntime_training.cmake Create dedicated build for training api (#14136) 2023-01-10 20:58:04 -08:00
onnxruntime_unittests.cmake Avoid trt deprecated api warnings shown as errors during ORT-TRT build (#16035) 2023-05-24 13:19:27 -07:00
onnxruntime_util.cmake
onnxruntime_webassembly.cmake Support WebNN EP (#15698) 2023-05-08 21:25:10 -07:00
precompiled_header.cmake
Sdl.ruleset Add a Github workflow for Prefast (#15763) 2023-05-03 11:42:51 -07:00
set_winapi_family_desktop.h
target_delayload.cmake
uwp_stubs.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
wcos_rules_override.cmake
winml.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00
winml_cppwinrt.cmake
winml_sdk_helpers.cmake
winml_unittests.cmake Use target name for flatbuffers (#13991) 2022-12-20 11:44:02 -08:00