From 39bc981f2a74b2ef92a046197f48444adffcde9d Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Mon, 8 Sep 2025 15:59:44 -0700 Subject: [PATCH] Address a bug when a number of meminfos requested is always for inputs --- onnxruntime/core/session/onnxruntime_c_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/session/onnxruntime_c_api.cc b/onnxruntime/core/session/onnxruntime_c_api.cc index 36f7f1f60c36e..21d09df5cc4db 100644 --- a/onnxruntime/core/session/onnxruntime_c_api.cc +++ b/onnxruntime/core/session/onnxruntime_c_api.cc @@ -3671,7 +3671,7 @@ OrtStatus* GetInputOutputMemoryInfo(const OrtSession* ort_session, InlinedVector mem_info; ORT_API_RETURN_IF_STATUS_NOT_OK( - session->GetInputOutputMemoryInfo(InferenceSession::SessionInputOutputType::kInput, mem_info)); + session->GetInputOutputMemoryInfo(type, mem_info)); auto num_found = mem_info.size(); if (num_found > num_values) {