diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h index b1905dab73..6a3c8b869d 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h @@ -1159,7 +1159,7 @@ inline void SessionImpl::SetEpDynamicOptions(const char* const* keys, const c template inline void SessionImpl::FinalizeModelBuilderSession(const ModelBuilderAPI::Model& model, const SessionOptions& options, OrtPrepackedWeightsContainer* prepacked_weights_container) { - ThrowOnError(GetModelBuilderApi().ApplyModelToSession(this->p_, model)); + ThrowOnError(GetModelBuilderApi().ApplyModelToModelBuilderSession(this->p_, model)); ThrowOnError(GetModelBuilderApi().FinalizeModelBuilderSession(this->p_, options, prepacked_weights_container)); }