forked from mindspore-Ecosystem/mindspore
!25171 [lite]rename parser_context.h
Merge pull request !25171 from 徐安越/master
This commit is contained in:
commit
291f1071a8
|
@ -254,7 +254,7 @@ build_lite() {
|
|||
local compile_nnie_script=${BASEPATH}/mindspore/lite/tools/providers/NNIE/Hi3516D/compile_nnie.sh
|
||||
if [[ "${MSLITE_ENABLE_NNIE}" == "on" && "${local_lite_platform}" == "x86_64" ]]; then
|
||||
cd ${BASEPATH}/../
|
||||
sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master -j $THREAD_NUM
|
||||
sh ${compile_nnie_script} -I x86_64 -b nnie_3516_master_dev -j $THREAD_NUM
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "compile x86_64 for nnie failed."
|
||||
exit 1
|
||||
|
@ -262,7 +262,7 @@ build_lite() {
|
|||
fi
|
||||
if [[ "${TOOLCHAIN_NAME}" == "himix200" && "${local_lite_platform}" == "arm32" ]]; then
|
||||
cd ${BASEPATH}/../
|
||||
sh ${compile_nnie_script} -I arm32 -b nnie_3516_master -j $THREAD_NUM
|
||||
sh ${compile_nnie_script} -I arm32 -b nnie_3516_master_dev -j $THREAD_NUM
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "compile arm32 for nnie failed."
|
||||
exit 1
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define MINDSPORE_LITE_INCLUDE_REGISTRY_MODEL_PARSER_H_
|
||||
|
||||
#include "api/ir/func_graph.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace converter {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include "include/lite_utils.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
using mindspore::converter::FmkType;
|
||||
namespace mindspore {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
namespace onnx {
|
||||
class GraphProto;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "backend/optimizer/common/pass.h"
|
||||
#include "include/errorcode.h"
|
||||
#include "include/api/types.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "cxx_api/model/acl/acl_model_options.h"
|
||||
#include "tools/converter/adapter/acl/common/acl_types.h"
|
||||
#include "tools/converter/converter_flags.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <memory>
|
||||
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
|
||||
#include "tools/converter/adapter/acl/mapper/tbe_op_def.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "src/common/log_util.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <memory>
|
||||
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
|
||||
#include "tools/converter/adapter/acl/mapper/tbe_op_def.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <vector>
|
||||
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
|
||||
#include "tools/converter/adapter/acl/common/utils.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "tools/converter/adapter/acl/mapper/tbe_op_def.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <memory>
|
||||
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
|
||||
#include "tools/converter/adapter/acl/mapper/tbe_op_def.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "tools/optimizer/common/gllo_utils.h"
|
||||
#include "ir/graph_utils.h"
|
||||
#include "include/errorcode.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "ops/op_utils.h"
|
||||
#include "ops/fusion/avg_pool_fusion.h"
|
||||
#include "backend/kernel_compiler/cpu/nnacl/op_base.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <memory>
|
||||
#include "tools/converter/adapter/acl/mapper/primitive_mapper_register.h"
|
||||
#include "tools/converter/adapter/acl/mapper/tbe_op_def.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "ops/op_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "tools/converter/converter_context.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace converter {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include "include/api/format.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "tools/common/flag_parser.h"
|
||||
#include "ir/dtype/type_id.h"
|
||||
#include "schema/inner/model_generated.h"
|
||||
|
|
|
@ -246,7 +246,8 @@ STATUS NodeInferShape(const std::unique_ptr<schema::CNodeT> &node, const std::ve
|
|||
|
||||
auto ret = KernelInferShape(inputs, *outputs, prim, {}, SCHEMA_CUR);
|
||||
if (ret == lite::RET_NOT_SUPPORT) {
|
||||
auto parameter_gen = lite::PopulateRegistry::GetInstance()->GetParameterCreator(prim->value_type(), SCHEMA_CUR);
|
||||
auto parameter_gen =
|
||||
lite::PopulateRegistry::GetInstance()->GetParameterCreator(static_cast<int>(prim->value_type()), SCHEMA_CUR);
|
||||
if (parameter_gen == nullptr) {
|
||||
fbb.Clear();
|
||||
MS_LOG(ERROR) << "PopulateParameter return nullptr, type: " << schema::EnumNamePrimitiveType(prim->value_type());
|
||||
|
@ -258,7 +259,7 @@ STATUS NodeInferShape(const std::unique_ptr<schema::CNodeT> &node, const std::ve
|
|||
MS_LOG(ERROR) << "parameter is nullptr.";
|
||||
return RET_ERROR;
|
||||
}
|
||||
parameter->quant_type_ = node->quantType;
|
||||
parameter->quant_type_ = static_cast<int>(node->quantType);
|
||||
ret = KernelInferShape(inputs, *outputs, parameter);
|
||||
if (parameter->destroy_func_ != nullptr) {
|
||||
parameter->destroy_func_(parameter);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "tools/common/tensor_util.h"
|
||||
#include "ops/batch_norm.h"
|
||||
#include "ops/op_utils.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "nnacl/op_base.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "tools/converter/parser/caffe/caffe_deconvolution_parser.h"
|
||||
#include <memory>
|
||||
#include "ops/fusion/conv2d_transpose_fusion.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "nnacl/op_base.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "ops/fusion/avg_pool_fusion.h"
|
||||
#include "ops/fusion/max_pool_fusion.h"
|
||||
#include "ops/op_utils.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "nnacl/op_base.h"
|
||||
#include "src/common/log_util.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <vector>
|
||||
#include "ops/fusion/avg_pool_fusion.h"
|
||||
#include "ops/fusion/max_pool_fusion.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "nnacl/op_base.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <string>
|
||||
#include "ops/strided_slice.h"
|
||||
#include "ops/op_utils.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "nnacl/op_base.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <memory>
|
||||
#include "backend/optimizer/common/pass.h"
|
||||
#include "include/api/context.h"
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "src/inner_context.h"
|
||||
#include "tools/optimizer/graph/node_infershape.h"
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ STATUS InferShapePass::InferProcess(const FuncGraphPtr &func_graph) {
|
|||
MS_LOG(ERROR) << "subgraph infer shape failed.";
|
||||
return lite::RET_ERROR;
|
||||
}
|
||||
if (SetSubGraphOutput(cnode, sub_func_graph)) {
|
||||
if (SetSubGraphOutput(sub_func_graph) != lite::RET_OK) {
|
||||
MS_LOG(ERROR) << "SetSubGraphOutput failed.";
|
||||
return lite::RET_ERROR;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ STATUS InferShapePass::InferProcess(const FuncGraphPtr &func_graph) {
|
|||
MS_LOG(ERROR) << "subgraph infer shape failed.";
|
||||
return lite::RET_ERROR;
|
||||
}
|
||||
if (SetSubGraphOutput(cnode, sub_func_graph) != lite::RET_OK) {
|
||||
if (SetSubGraphOutput(sub_func_graph) != lite::RET_OK) {
|
||||
MS_LOG(ERROR) << "SetSubGraphOutput failed.";
|
||||
return lite::RET_ERROR;
|
||||
}
|
||||
|
@ -289,8 +289,8 @@ STATUS InferShapePass::SetSubGraphInput(const CNodePtr &cnode, const FuncGraphPt
|
|||
return RET_OK;
|
||||
}
|
||||
|
||||
STATUS InferShapePass::SetSubGraphOutput(const CNodePtr &cnode, const FuncGraphPtr &sub_graph) {
|
||||
MS_ASSERT(cnode != nullptr && sub_graph != nullptr);
|
||||
STATUS InferShapePass::SetSubGraphOutput(const FuncGraphPtr &sub_graph) {
|
||||
MS_ASSERT(sub_graph != nullptr);
|
||||
auto return_node = sub_graph->get_return();
|
||||
MS_ASSERT(return_node != nullptr);
|
||||
auto origin_input = return_node->inputs();
|
||||
|
|
|
@ -36,7 +36,7 @@ class InferShapePass : public Pass {
|
|||
bool JudgeAllOpsCanInfer(const FuncGraphPtr &func_graph);
|
||||
STATUS InferProcess(const FuncGraphPtr &func_graph);
|
||||
STATUS SetSubGraphInput(const CNodePtr &cnode, const FuncGraphPtr &sub_graph);
|
||||
STATUS SetSubGraphOutput(const CNodePtr &cnode, const FuncGraphPtr &sub_graph);
|
||||
STATUS SetSubGraphOutput(const FuncGraphPtr &sub_graph);
|
||||
STATUS SetSubGraphAbstract(const CNodePtr &cnode, const FuncGraphPtr &sub_graph);
|
||||
int ResetSubGraphInput();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define MINDSPORE_LITE_TOOLS_OPTIMIZER_GRAPH_LITE_TENSOR_EXTRACTOR_H_
|
||||
|
||||
#include <vector>
|
||||
#include "include/registry/parser_context.h"
|
||||
#include "include/registry/converter_context.h"
|
||||
#include "ir/anf.h"
|
||||
#include "src/tensor.h"
|
||||
#include "tools/anf_exporter/fetch_content.h"
|
||||
|
|
Loading…
Reference in New Issue