diff --git a/lite/model_parser/flatbuffers/op_desc.h b/lite/model_parser/flatbuffers/op_desc.h index 32974f34d152ca6aa06654f6168bea8d2e6818ea..23bd00e8c01d52bafb69b9faf5942339756eefec 100644 --- a/lite/model_parser/flatbuffers/op_desc.h +++ b/lite/model_parser/flatbuffers/op_desc.h @@ -171,8 +171,15 @@ class OpDescView : public OpDescAPI { } std::vector input_vars() const { - NotImplemented(); - return std::vector(); + VLOG(5) << "This function call is expensive."; + std::vector res; + for (const auto& var : *(desc_->inputs())) { + if (var && var->arguments()) { + res.emplace_back(var->arguments()->begin()->c_str(), + var->arguments()->end()->c_str()); + } + } + return res; } std::vector output_vars() const { diff --git a/lite/tools/build.sh b/lite/tools/build.sh index 4729440c0078ee9ca47a9ca815d62970a17ffaf5..6fc38180e729eaaf8230bd6bb4e8638f045e709b 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -436,6 +436,7 @@ function print_usage { echo -e "--build_python: (OFF|ON); controls whether to publish python api lib (ANDROID and IOS is not supported)" echo -e "--build_java: (OFF|ON); controls whether to publish java api lib (Only ANDROID is supported)" echo -e "--build_dir: directory for building" + echo -e "--enable_flatbuffers_view: (OFF|ON); Use the flatbuffers read-only view to load the model. If ON, the naive buffer will no longer be supported." echo echo -e "argument choices:" echo -e "--arm_os:\t android|ios|ios64"