diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 5ac9c149bbe80..ce7259172da30 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -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; },