mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-27 20:02:15 +00:00
Fix android build (#2558)
This commit is contained in:
parent
4c996a8699
commit
ace132f9aa
2 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue