3737#include " core/optimizer/qdq_transformer/selectors_actions/shared/utils.h"
3838#include " core/providers/partitioning_utils.h"
3939
40- #include " core/providers/qnn/ort_api.h"
41-
4240namespace onnxruntime {
4341VSINPUExecutionProvider::VSINPUExecutionProvider (const VSINPUExecutionProviderInfo& info)
4442 : IExecutionProvider{onnxruntime::kVSINPUExecutionProvider ,
@@ -56,17 +54,17 @@ VSINPUExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie
5654 const GraphOptimizerRegistry& /* graph_optimizer_registry */ ,
5755 IResourceAccountant* /* resource_accountant */ ) const {
5856 std::vector<std::unique_ptr<ComputeCapability>> result;
59-
57+ const auto & logger = * GetLogger ();
6058 if (graph_viewer.IsSubgraph ()) {
6159 return result;
6260 }
6361
6462 for (const auto & tensor : graph_viewer.GetAllInitializedTensors ()) {
6563 if (tensor.second ->has_data_location ()) {
66- LOGS_DEFAULT ( VERBOSE) << " location:" << tensor.second ->data_location ();
64+ LOGS (logger, VERBOSE) << " location:" << tensor.second ->data_location ();
6765 if (tensor.second ->data_location () ==
6866 ONNX_NAMESPACE::TensorProto_DataLocation_EXTERNAL) {
69- LOGS_DEFAULT ( WARNING) << " VSINPU: Initializers with external data location are not "
67+ LOGS (logger, WARNING) << " VSINPU: Initializers with external data location are not "
7068 " currently supported" ;
7169 return result;
7270 }
@@ -93,11 +91,11 @@ VSINPUExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie
9391 supported = it->second ;
9492 } else {
9593 // We only check the target node of the node unit
96- supported = vsi::npu::GraphEP::IsNodeSupportedInGroup (*node_unit, graph_viewer);
94+ supported = vsi::npu::GraphEP::IsNodeSupportedInGroup (*node_unit, graph_viewer, logger );
9795 node_unit_supported_result[node_unit] = supported;
9896 }
9997
100- LOGS_DEFAULT ( VERBOSE) << " Node supported: [" << supported
98+ LOGS (logger, VERBOSE) << " Node supported: [" << supported
10199 << " ] Operator type: [" << node.OpType ()
102100 << " ] index: [" << node.Index ()
103101 << " ] name: [" << node.Name ()
@@ -158,9 +156,9 @@ VSINPUExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie
158156 // If the graph is partitioned in multiple subgraphs, and this may impact performance,
159157 // we want to give users a summary message at warning level.
160158 if (num_of_partitions > 1 ) {
161- LOGS_DEFAULT ( WARNING) << summary_msg;
159+ LOGS (logger, WARNING) << summary_msg;
162160 } else {
163- LOGS_DEFAULT ( INFO) << summary_msg;
161+ LOGS (logger, INFO) << summary_msg;
164162 }
165163
166164 return result;
0 commit comments