Skip to content

Implement load cancellation ability - #24257

Merged
Dmitri Smirnov (yuslepukhin) merged 10 commits into
mainfrom
yuslepukhin/load_cancelletion
Apr 7, 2025
Merged

Implement load cancellation ability#24257
Dmitri Smirnov (yuslepukhin) merged 10 commits into
mainfrom
yuslepukhin/load_cancelletion

Conversation

@yuslepukhin

Copy link
Copy Markdown
Contributor

Description

SessionOptions now have a new property - load_cancelation_flag.
This flag if set to true causes the model to abort load and initialization for huge models.

Motivation and Context

Some users request an ability to abandon model loading and initialization if that exceeds certain time limits.

Add python interface.
Add CSharp interface.
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Comment thread onnxruntime/core/graph/model.h Outdated
Comment thread onnxruntime/core/graph/graph.cc Outdated
Comment thread onnxruntime/core/framework/session_state.cc Outdated
Comment thread onnxruntime/core/optimizer/graph_transformer_mgr.h Outdated
Comment thread onnxruntime/core/framework/graph_partitioner.cc Outdated
Comment thread onnxruntime/core/framework/graph_partitioner.cc Outdated
Comment thread onnxruntime/core/framework/graph_partitioner.cc Outdated
Comment thread onnxruntime/core/framework/graph_partitioner.cc Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Comment thread onnxruntime/core/framework/session_options.h Outdated
Comment thread onnxruntime/core/framework/session_state_utils.cc Outdated
Comment thread onnxruntime/core/optimizer/graph_optimizer_registry.h Outdated
Comment thread onnxruntime/core/framework/session_state.cc Outdated
Comment thread onnxruntime/test/framework/inference_session_test.cc Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_cxx_api.h
Comment thread onnxruntime/test/framework/inference_session_test.cc Outdated
Comment thread include/onnxruntime/core/common/common.h Outdated
Comment thread include/onnxruntime/core/common/exceptions.h
Comment thread include/onnxruntime/core/common/exceptions.h Outdated
Comment thread include/onnxruntime/core/common/exceptions.h Outdated
Comment thread onnxruntime/core/framework/session_options.h Outdated
Comment thread onnxruntime/core/framework/session_options.h Outdated
Comment thread onnxruntime/core/session/abi_session_options.cc
Comment thread onnxruntime/test/framework/inference_session_test.cc Outdated
Comment thread include/onnxruntime/core/common/common.h Outdated
Comment thread include/onnxruntime/core/common/common.h Outdated
Comment thread include/onnxruntime/core/common/exceptions.h Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Comment thread include/onnxruntime/core/session/onnxruntime_c_api.h Outdated
Comment thread include/onnxruntime/core/common/common.h
Comment thread include/onnxruntime/core/common/common.h
Comment thread onnxruntime/core/framework/session_options.h Outdated
Comment thread onnxruntime/core/session/onnxruntime_c_api.cc
@yuslepukhin
Dmitri Smirnov (yuslepukhin) deleted the yuslepukhin/load_cancelletion branch April 7, 2025 17:22
zhaoxul-qti pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Apr 17, 2025
### Description
SessionOptions now have a new property - load_cancelation_flag.
This flag if set to true causes the model to abort load and
initialization for huge models.

### Motivation and Context
Some users request an ability to abandon model loading and
initialization if that exceeds certain time limits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants