Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nnapi op support for Mobilenetv2 model #272

Merged
merged 2 commits into from
Jun 14, 2022
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
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/BackendNnapi.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ namespace webnn::native::nnapi {
return backend;
}

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/BackendNnapi.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ namespace webnn::native::nnapi {
private:
};

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi

#endif // WEBNN_NATIVE_IE_BACKEND_NNAPI_H_
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/ContextNnapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ namespace webnn::native::nnapi {
return new Graph(this);
}

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/ContextNnapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ namespace webnn::native::nnapi {
GraphBase* CreateGraphImpl() override;
};

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi

#endif // WEBNN_NATIVE_NNAPI_CONTEXT_NN_H_
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/ErrorNnapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ namespace webnn::native::nnapi {
return {};
}

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi
441 changes: 415 additions & 26 deletions src/webnn/native/nnapi/GraphNnapi.cpp

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/webnn/native/nnapi/GraphNnapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ namespace webnn::native::nnapi {
float alpha);
MaybeError AddSigmoidImpl(const std::shared_ptr<NodeInfo>& inputNode,
std::shared_ptr<NodeInfo> outputNode);
MaybeError AddReluImpl(const std::shared_ptr<NodeInfo>& inputNode,
std::shared_ptr<NodeInfo> outputNode);

template <class T>
std::shared_ptr<NodeInfo> CreateOperand(std::string name,
Expand Down Expand Up @@ -224,6 +226,6 @@ namespace webnn::native::nnapi {
std::vector<std::unique_ptr<int32_t>> memInt32Vec;
};

} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi

#endif // WEBNN_NATIVE_NNAPI_MODEL_NN_H_
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/NnapiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ namespace webnn::native::nnapi {

return NNAPIComputeGraphStatus_Success;
}
} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi
2 changes: 1 addition & 1 deletion src/webnn/native/nnapi/NnapiUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ namespace webnn::native::nnapi {

return {};
}
} // namespace webnn::native::nnapi
} // namespace webnn::native::nnapi

#endif