From 5e92e90a41be45ab00d1892d3161e08d738e4d6d Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 21 Jan 2025 10:49:25 -0800 Subject: [PATCH] Address some build issues --- .../core/providers/cuda/cuda_execution_provider.cc | 10 +++++----- .../nnapi/nnapi_builtin/nnapi_execution_provider.cc | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc index 2b64f086e2649..eb045c1ad3382 100644 --- a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc +++ b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc @@ -2735,11 +2735,11 @@ CUDAExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph, // Previously assigned nodes have been accounted before if (previously_assigned_nodes.count(node_index) > 0 || resource_accountant == nullptr) { // XXX: For demo only - constexpr const size_t kNodeCountThreshold = 800; - static std::atomic_size_t nodes_assigned = 0; - if (nodes_assigned.fetch_add(1) > kNodeCountThreshold) { - ORT_THROW("CUDA EP is running out of memory"); - } + //constexpr const size_t kNodeCountThreshold = 800; + //static std::atomic_size_t nodes_assigned = 0; + //if (nodes_assigned.fetch_add(1) > kNodeCountThreshold) { + // ORT_THROW("CUDA EP is running out of memory"); + //} /// XXX: End of DEMO auto sub_graph = IndexedSubGraph::Create(); sub_graph->Nodes().push_back(node_index); diff --git a/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_execution_provider.cc b/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_execution_provider.cc index b7fa091b367f3..27bd584e2d3c6 100644 --- a/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_execution_provider.cc +++ b/onnxruntime/core/providers/nnapi/nnapi_builtin/nnapi_execution_provider.cc @@ -83,6 +83,7 @@ NnapiExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_view const IKernelLookup& /*kernel_lookup*/, IResourceAccountant* /* resource_accountant */) const { std::vector> result; + const logging::Logger& logger = *GetLogger(); // TODO: Task 812756: NNAPI EP, add support for subgraph (If and Loop operators) if (graph_viewer.IsSubgraph()) {