mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-07 04:39:07 +00:00
[PyBind] Expose enable_mem_arena property for SessionOptions (#22323)
### Description Expose enable_mem_arena property for SessionOptions ### Motivation and Context https://github.com/microsoft/onnxruntime/issues/22271
This commit is contained in:
parent
715b74d61a
commit
0645ad19a4
1 changed files with 7 additions and 0 deletions
|
|
@ -1688,6 +1688,13 @@ Serialized model format will default to ONNX unless:
|
|||
- there is no 'session.save_model_format' config entry and optimized_model_filepath ends in '.ort' (case insensitive)
|
||||
|
||||
)pbdoc")
|
||||
.def_property(
|
||||
"enable_cpu_mem_arena",
|
||||
[](const PySessionOptions* options) -> bool { return options->value.enable_cpu_mem_arena; },
|
||||
[](PySessionOptions* options, bool enable_cpu_mem_arena) -> void {
|
||||
options->value.enable_cpu_mem_arena = enable_cpu_mem_arena;
|
||||
},
|
||||
R"pbdoc(Enable memory arena on CPU. Default is true.)pbdoc")
|
||||
.def_property(
|
||||
"enable_mem_pattern",
|
||||
[](const PySessionOptions* options) -> bool { return options->value.enable_mem_pattern; },
|
||||
|
|
|
|||
Loading…
Reference in a new issue