Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions onnxruntime/core/providers/nnapi/nnapi_execution_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ NnapiExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph,
const std::vector<const KernelRegistry*>& /*kernel_registries*/) const {
// This method is based on that of TRT EP
// Construct modelproto from graph
onnxruntime::Model model(graph.Name(), true, ModelMetaData(), IOnnxRuntimeOpSchemaRegistryList(), graph.DomainToVersionMap());
onnxruntime::Model model(graph.Name(), true, ModelMetaData(), IOnnxRuntimeOpSchemaRegistryList(), graph.DomainToVersionMap(),
std::vector<ONNX_NAMESPACE::FunctionProto>(), *GetLogger());
onnxruntime::Graph& graph_build = model.MainGraph();
const std::vector<NodeIndex>& node_index = graph.GetNodesInTopologicalOrder();
std::set<NodeArg*> all_node_inputs;
Expand Down Expand Up @@ -202,7 +203,8 @@ common::Status NnapiExecutionProvider::Compile(const std::vector<onnxruntime::No
}
const Graph& graph_body = func_body->Body();
onnxruntime::Model model(graph_body.Name(), true, ModelMetaData(),
IOnnxRuntimeOpSchemaRegistryList(), graph_body.DomainToVersionMap());
IOnnxRuntimeOpSchemaRegistryList(), graph_body.DomainToVersionMap(),
std::vector<ONNX_NAMESPACE::FunctionProto>(), *GetLogger());
ONNX_NAMESPACE::ModelProto model_proto = model.ToProto();
*(model_proto.mutable_graph()) = graph_body.ToGraphProto();
model_proto.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION);
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/test/providers/nnapi/nnapi_basic_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void VerifyOutputs(const std::vector<OrtValue>& fetches, const std::vector<int64
}

TEST(NnapiExecutionProviderTest, FunctionTest) {
onnxruntime::Model model("graph_1");
onnxruntime::Model model("graph_1", false, DefaultLoggingManager().DefaultLogger());
auto& graph = model.MainGraph();
std::vector<onnxruntime::NodeArg*> inputs;
std::vector<onnxruntime::NodeArg*> outputs;
Expand Down