diff --git a/onnxruntime/core/providers/cpu/controlflow/loop.cc b/onnxruntime/core/providers/cpu/controlflow/loop.cc index 3937ab4ed5..89dbf9f8d7 100644 --- a/onnxruntime/core/providers/cpu/controlflow/loop.cc +++ b/onnxruntime/core/providers/cpu/controlflow/loop.cc @@ -257,7 +257,6 @@ Status LoopImpl::CreateFeedsFetchesManager(std::unique_ptr& feed_names.push_back(entry.first); } - FeedsFetchesInfo ffi(feed_names, subgraph_output_names_); auto status = FeedsFetchesManager::Create(feed_names, subgraph_output_names_, session_state_.GetOrtValueNameIdxMap(), ffm); diff --git a/onnxruntime/core/providers/cpu/controlflow/scan_utils.cc b/onnxruntime/core/providers/cpu/controlflow/scan_utils.cc index 821c84a78c..2c69606655 100644 --- a/onnxruntime/core/providers/cpu/controlflow/scan_utils.cc +++ b/onnxruntime/core/providers/cpu/controlflow/scan_utils.cc @@ -125,7 +125,6 @@ Status CreateFeedsFetchesManager(const GraphViewer& subgraph, int num_variadic_i feed_names.push_back(entry.first); } - FeedsFetchesInfo ffi(feed_names, subgraph_output_names); auto status = FeedsFetchesManager::Create(feed_names, subgraph_output_names, ort_value_name_idx_map, ffm); return status; diff --git a/onnxruntime/core/providers/cpu/controlflow/utils.h b/onnxruntime/core/providers/cpu/controlflow/utils.h index b5a39bcfde..d3427e9104 100644 --- a/onnxruntime/core/providers/cpu/controlflow/utils.h +++ b/onnxruntime/core/providers/cpu/controlflow/utils.h @@ -26,7 +26,8 @@ common::Status SubgraphExecuteHelper(std::unique_ptr& cache } else { // use a local instance until we know we're successful, and cache if it is std::unique_ptr new_ffm; - impl.CreateFeedsFetchesManager(new_ffm); + ORT_RETURN_IF_ERROR(impl.CreateFeedsFetchesManager(new_ffm)); + status = impl.Execute(&*new_ffm, nullptr); if (status.IsOK()) { cached_feeds_fetches_manager = std::move(new_ffm);