Skip to content

Commit

Permalink
[PyBind] Expose enable_mem_arena property for SessionOptions (#22323)
Browse files Browse the repository at this point in the history
### Description
Expose enable_mem_arena property for SessionOptions

### Motivation and Context
#22271
  • Loading branch information
yuslepukhin authored Oct 4, 2024
1 parent 715b74d commit 0645ad1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions onnxruntime/python/onnxruntime_pybind_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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; },
Expand Down

0 comments on commit 0645ad1

Please sign in to comment.