diff --git a/mindspore/lite/tools/common/node_util.cc b/mindspore/lite/tools/common/node_util.cc index 6dc46907a6b..14b34db42fa 100644 --- a/mindspore/lite/tools/common/node_util.cc +++ b/mindspore/lite/tools/common/node_util.cc @@ -35,21 +35,30 @@ static const std::vector fp32FullOpList = { schema::PrimitiveType_Concat, schema::PrimitiveType_Add, schema::PrimitiveType_Floor}; // fp32 ops support C4 and nhwc in fp32 -static const std::vector uint8NeedNhwcOpList = {}; +static const std::vector int8NeedNhwcOpList = {}; -static const std::vector uint8OpList = { - schema::PrimitiveType_Nchw2Nhwc, schema::PrimitiveType_Nhwc2Nchw, schema::PrimitiveType_Conv2D, - schema::PrimitiveType_DepthwiseConv2D, schema::PrimitiveType_Add, schema::PrimitiveType_Pooling, - schema::PrimitiveType_Concat, schema::PrimitiveType_SoftMax, schema::PrimitiveType_Reshape, - schema::PrimitiveType_Activation}; +static const std::vector int8OpList = { + schema::PrimitiveType_Nchw2Nhwc, schema::PrimitiveType_Nhwc2Nchw, + schema::PrimitiveType_Conv2D, schema::PrimitiveType_DepthwiseConv2D, + schema::PrimitiveType_Add, schema::PrimitiveType_Pooling, + schema::PrimitiveType_Concat, schema::PrimitiveType_SoftMax, + schema::PrimitiveType_Reshape, schema::PrimitiveType_Activation, + schema::PrimitiveType_Resize, schema::PrimitiveType_FullConnection, + schema::PrimitiveType_ArgMax, schema::PrimitiveType_ArgMin, + schema::PrimitiveType_BatchNorm, schema::PrimitiveType_FusedBatchNorm, + schema::PrimitiveType_BiasAdd, schema::PrimitiveType_Div, + schema::PrimitiveType_Mul, schema::PrimitiveType_Slice, + schema::PrimitiveType_SoftMax, schema::PrimitiveType_Split, + schema::PrimitiveType_Squeeze, schema::PrimitiveType_Sub, + schema::PrimitiveType_TopK, schema::PrimitiveType_Unsqueeze}; std::vector Getfp32FullOpList() { return fp32FullOpList; } std::vector GetNhwcOpList() { return nhwcOpList; } -std::vector GetUint8NhwcOpList() { return uint8NeedNhwcOpList; } +std::vector GetUint8NhwcOpList() { return int8NeedNhwcOpList; } -std::vector GetUint8OpList() { return uint8OpList; } +std::vector GetUint8OpList() { return int8OpList; } STATUS NodeUtils::ConvertDims(mindspore::lite::Format src_format, const std::vector &src_dims, mindspore::lite::Format dst_format, std::vector *dst_dims) {