From a83dd111b7fd443989db60fede7b2d6f790a9949 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 28 Jan 2025 21:23:10 -0800 Subject: [PATCH] remove commented code --- .../core/framework/graph_partitioner.cc | 4 -- .../core/session/provider_bridge_ort.cc | 37 ------------------- 2 files changed, 41 deletions(-) diff --git a/onnxruntime/core/framework/graph_partitioner.cc b/onnxruntime/core/framework/graph_partitioner.cc index a8f33ff819..41a0ce4906 100644 --- a/onnxruntime/core/framework/graph_partitioner.cc +++ b/onnxruntime/core/framework/graph_partitioner.cc @@ -363,10 +363,6 @@ static Node* PlaceNode(Graph& graph, const IndexedSubGraph& capability, return result; } -static Status TransformGraph(Graph& graph, const ComputeCapability& this_optimization, ComputeCapability& cc_to_update) { - -} - // for the current EP, recursively iterate through the Graph and any nested subgraphs (recursion is bottom-up). // assign any nodes to the EP that are currently unassigned, and that the EP can handle. static Status PartitionOnnxFormatModelImpl(Graph& graph, FuncManager& func_mgr, diff --git a/onnxruntime/core/session/provider_bridge_ort.cc b/onnxruntime/core/session/provider_bridge_ort.cc index fbe299f68f..b5741f0851 100644 --- a/onnxruntime/core/session/provider_bridge_ort.cc +++ b/onnxruntime/core/session/provider_bridge_ort.cc @@ -204,43 +204,6 @@ common::Status LoadDynamicLibraryFromProvider(onnxruntime::PathString library_na } #endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS) -/* -Status ApplyConstantFoldingDQ(const Graph&, const ComputeCapability& this_optimization, ComputeCapability& cc_to_update) { - auto logger = const_cast(&logging::LoggingManager::DefaultLogger()); - return Status::OK(); -} - -std::vector> ConstantFoldingDQ(const GraphViewer& graph_viewer) { - std::vector> result; - std::unique_ptr sub_graph = std::make_unique(); - const std::vector& node_index = graph_viewer.GetNodesInTopologicalOrder(ExecutionOrder::PRIORITY_BASED); - for (const auto& index : node_index) { - const auto& node = graph_viewer.GetNode(index); - if (node->OpType() != "DequantizeLinear") { - continue; - } - sub_graph->nodes.push_back(index); - std::cout << node->Name() << ", op type: " << node->OpType() << std::endl; - } - - result.push_back(std::make_unique(std::move(sub_graph))); - result.back()->optimization_func = ApplyConstantFoldingDQ; - return result; -} - -Status GetPredefinedEPGraphTransformersForLookUp(std::unordered_map>(const GraphViewer&)>>& map) { - static const std::string kEP_GRAPH_TRANSFORMER_CONSTANT_FOLDING_DQ = "ConstantFoldingDQ"; - static std::unordered_map>(const GraphViewer&)>> ep_transformers_map; - - if (ep_transformers_map.find(kEP_GRAPH_TRANSFORMER_CONSTANT_FOLDING_DQ) == ep_transformers_map.end()) { - ep_transformers_map[kEP_GRAPH_TRANSFORMER_CONSTANT_FOLDING_DQ] = ConstantFoldingDQ; - } - - map = ep_transformers_map; - return Status::OK(); -} -*/ - const GraphTransformerManager* graph_transformer_manager; #if defined(_MSC_VER) && !defined(__clang__)