File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1111#include < glog/logging.h>
1212#include < onnx/optimizer/optimize.h>
1313#include < onnx/shape_inference/implementation.h>
14+ #ifdef __ANDROID__
15+ #include < dnnlibrary/nnapi_implementation.h>
16+ #endif
1417#include " NodeAttrHelper.h"
1518
1619using std::string;
@@ -439,6 +442,11 @@ dnn::optional<Shaper::Shape> GetShape(
439442std::pair<bool , std::string> OnnxConverter::IsNodeSupported (
440443 const ONNX_NAMESPACE::ModelProto &model_proto,
441444 const ONNX_NAMESPACE::NodeProto &node) const {
445+ #ifdef __ANDROID__
446+ if (GetAndroidSdkVersion () < 27 ) {
447+ return {false , " Android API level is lower than 27" };
448+ }
449+ #endif
442450 NodeAttrHelper helper (node);
443451 const auto &op = node.op_type ();
444452 const std::vector<std::string> supported_types{
You can’t perform that action at this time.
0 commit comments