diff --git a/mindspore/lite/src/populate_parameter.cc b/mindspore/lite/src/populate_parameter.cc index acd5a3dea5eef89e0e3b32871753a12445dc646b..6a530092d7dd15100a911ff7c5665a373531cb2a 100644 --- a/mindspore/lite/src/populate_parameter.cc +++ b/mindspore/lite/src/populate_parameter.cc @@ -263,7 +263,6 @@ OpParameter *PopulatePoolingParameter(const mindspore::lite::PrimitiveC *primiti pooling_param->global_ = pooling_primitive->GetGlobal(); pooling_param->window_w_ = pooling_primitive->GetWindowW(); pooling_param->window_h_ = pooling_primitive->GetWindowH(); - // todo format auto pooling_lite_primitive = (lite::Pooling *)primitive; MS_ASSERT(nullptr != pooling_lite_primitive); pooling_param->pad_u_ = pooling_lite_primitive->PadUp(); @@ -402,7 +401,6 @@ OpParameter *PopulateConvDwParameter(const mindspore::lite::PrimitiveC *primitiv auto conv_primitive = dynamic_cast(primitive); conv_param->kernel_h_ = conv_primitive->GetKernelH(); conv_param->kernel_w_ = conv_primitive->GetKernelW(); - // todo format, group conv_param->stride_h_ = conv_primitive->GetStrideH(); conv_param->stride_w_ = conv_primitive->GetStrideW(); diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/pad.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/pad.cc index c8c13a802c2cf1ab613371f1c6550bc99f91887a..bd4a14c88b1036b3970c4516bc3f0b8a4e29424c 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/pad.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/pad.cc @@ -101,7 +101,6 @@ int PadCPUKernel::Run() { int output_size = output->DataSize(); auto output_data = reinterpret_cast(output->Data()); - // todo parallel memset to save time memset(output_data, 0, output_size * sizeof(float)); int error_code = LiteBackendParallelLaunch(PadImpl, this, context_->thread_num_); diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/scatter_nd.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/scatter_nd.cc index 3a7fadfb0aac0193fc092940ce84d7d8cba3204d..58ef67a2c1c21d07b1ff137450fff10295f27fac 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/scatter_nd.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/scatter_nd.cc @@ -87,7 +87,6 @@ int ScatterNDCPUKernel::ReSize() { return RET_ERROR; } } - // todo check indeices out of range // for (size_t i = 0; i < static_cast(indice_unit_rank); i++) {} // calculate unit_size_ diff --git a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp16/conv_fp16.c b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp16/conv_fp16.c index 2975f48e08126bb900e95a945f66a8987036cd97..91bac43931e7d5c3975ea234714d2b2a720b7e9e 100644 --- a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp16/conv_fp16.c +++ b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp16/conv_fp16.c @@ -332,7 +332,6 @@ void ConvFp16(float16_t *input_data, float16_t *packed_input, float16_t *packed_ int out_channel = conv_param->output_channel_; bool relu = conv_param->is_relu_; bool relu6 = conv_param->is_relu6_; - // todo int thread_count = conv_param->thread_num_; const int tile_n = 16; int output_count = out_h * out_w; diff --git a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/arithmetic.c b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/arithmetic.c index e6fd74c7cc78eadf725f7769c5f171d5acd7dee2..0bfc8e6164982e4eb99170dcc88536b7f04305bb 100644 --- a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/arithmetic.c +++ b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/arithmetic.c @@ -379,7 +379,6 @@ int BroadcastSub(float *input0, float *input1, float *tile_input0, float *tile_i return ElementSub(tile_input0, tile_input1, output, element_size); } -// todo c=a/b,if(b==0) int ElementDiv(float *input0, float *input1, float *output, int element_size) { for (int i = 0; i < element_size; i++) { if (input1[i] == 0) { diff --git a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/conv_depthwise.c b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/conv_depthwise.c index 20b5ce7b6b143565807443571f4888f49121c1bb..a147c55273488f660bb9f7ad204d5b36dba932f4 100644 --- a/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/conv_depthwise.c +++ b/mindspore/lite/src/runtime/kernel/arm/nnacl/fp32/conv_depthwise.c @@ -423,7 +423,6 @@ void ConvDw3x3Fp32InputTrans(const float *input_data, float *trans_input, float } } -// todo yangruoqi: implement assembly void ConvDw3x3Fp32Winograd(float *trans_buffer, const float *weight, int out_h_block, int out_w_block) { const int unit = 4; for (int oh = 0; oh < out_h_block; oh++) { diff --git a/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/deconv.c b/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/deconv.c index 30d3a8f734baf588b7d23c85880bdd181ed618e9..635a37c5d090d5f832cef2c140a6f0103305ed69 100644 --- a/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/deconv.c +++ b/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/deconv.c @@ -152,7 +152,7 @@ void DeConvWeightTransInt8(int8_t *src, int8_t *dst, int input_channel, int outp } } } else { - /* todo normal int8 deconv */ + /* normal int8 deconv */ } return; } @@ -171,7 +171,7 @@ void DeConvPackWeightSum(int8_t *weight, int32_t *weight_sum, int32_t input_zp, weight_sum[c] = filter_zp * input_zp * deep16 - value * input_zp; } } else { - /* todo normal int8 deconv */ + /* normal int8 deconv */ } return; } @@ -188,7 +188,7 @@ void DeConvPackInputSum(const int8_t *src, int32_t *dst, int32_t filter_zp, int dst[r] = tmp_value * filter_zp; } } else { - /* todo normal int8 deconv */ + /* normal int8 deconv */ } return; } @@ -199,7 +199,7 @@ int DeConvInt8(const int8_t *input, const int8_t *weight, int32_t *output, int32 if (matmul_func != NULL) { matmul_func(input, weight, output, act_row, act_col, act_deep, input_sum, weight_sum); } else { - /* todo normal int8 deconv */ + /* normal int8 deconv */ } return NNACL_OK; } @@ -210,7 +210,7 @@ int DeConvPostInt8(const int32_t *src, const int32_t *bias, int32_t *tmp, int8_t if (support_optimize) { error_code = DeConvPostInt8C4(src, bias, tmp, out, output_channel, conv_param); } else { - /* todo normal int8 deconv post */ + /* normal int8 deconv post */ } return error_code; } diff --git a/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/reduce_int8.c b/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/reduce_int8.c index 272949d3ee2796acabc04f2610ef3c39f75aa07f..9989160bfe11f53504885abc499e30e7368ce7a9 100644 --- a/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/reduce_int8.c +++ b/mindspore/lite/src/runtime/kernel/arm/nnacl/int8/reduce_int8.c @@ -377,7 +377,7 @@ int ReduceProdInt8(const int outer_size, const int inner_size, const int axis_si if (isAddOverflow(prod, quant->in_zp_)) { return NNACL_ERRCODE_ADD_OVERFLOW; } - *inner_dst = prod + quant->in_zp_; // todo overflow + *inner_dst = prod + quant->in_zp_; } } return NNACL_OK; diff --git a/mindspore/lite/src/runtime/opencl/opencl_executor.cc b/mindspore/lite/src/runtime/opencl/opencl_executor.cc index 38841a067bdbf5e86ca2dcb465912b0fe7aa9eb7..aa95bd09227d7690d69a526a5fa37dd13bd34461 100644 --- a/mindspore/lite/src/runtime/opencl/opencl_executor.cc +++ b/mindspore/lite/src/runtime/opencl/opencl_executor.cc @@ -130,7 +130,6 @@ int OpenCLExecutor::TransformTensorLayoutToBuffer(tensor::Tensor *tensor, schema tensor->SetFormat(dst_format); return RET_OK; } else if (dst_format == schema::Format_NHWC) { - // TODO(wandongdong): add support !! return RET_OK; } else { MS_LOG(ERROR) << "Unsupported layout transform: " << schema::EnumNameFormat(tensor->GetFormat()) << " to " @@ -200,7 +199,6 @@ int OpenCLExecutor::TransformTensorLayoutUint8(tensor::Tensor *tensor, schema::F MS_ASSERT(nullptr != tensor); MS_ASSERT(4 == tensor->shape().size()); // auto src_format = tensor->GetFormat(); - // todo MS_LOG(ERROR) << "Unsupported layout transform: " << schema::EnumNameFormat(tensor->GetFormat()) << " to " << schema::EnumNameFormat(dst_format) << " in uint8"; return RET_ERROR; diff --git a/mindspore/lite/test/ut/src/runtime/kernel/arm/common/pack_tests.cc b/mindspore/lite/test/ut/src/runtime/kernel/arm/common/pack_tests.cc index a87c8f2cb11e2715abea264b1fd109508e8be5a9..7c3099bd4b1e3935b7d62d02a63ac1c862c73003 100644 --- a/mindspore/lite/test/ut/src/runtime/kernel/arm/common/pack_tests.cc +++ b/mindspore/lite/test/ut/src/runtime/kernel/arm/common/pack_tests.cc @@ -138,7 +138,6 @@ TEST_F(TestPack, PackWeightFp32) { #ifdef ENABLE_FP16 TEST_F(TestPack, PackInputFp16) { - // todo size_t input_size; std::string input_path = "./test_data/conv/convfp32_input_1_28_28_3.bin"; auto input_data = reinterpret_cast(mindspore::lite::ReadFile(input_path.c_str(), &input_size)); diff --git a/mindspore/lite/test/ut/src/runtime/kernel/arm/fp16/convolution_fp16_tests.cc b/mindspore/lite/test/ut/src/runtime/kernel/arm/fp16/convolution_fp16_tests.cc index 8151d6dccac308a73f80106f67440143225adcf0..f29be92676b1baea55c23a187f3c467da7365bdb 100644 --- a/mindspore/lite/test/ut/src/runtime/kernel/arm/fp16/convolution_fp16_tests.cc +++ b/mindspore/lite/test/ut/src/runtime/kernel/arm/fp16/convolution_fp16_tests.cc @@ -328,7 +328,6 @@ TEST_F(TestConvolutionFp16, ConvTest2) { TEST_F(TestConvolutionFp16, Conv3x3Test1) { auto conv_param = new ConvParameter(); InitConvParamGroup1Fp16(conv_param); - // todo int thread_count = 1; int tile_num = 16; int output_batch = conv_param->output_batch_; @@ -474,7 +473,6 @@ TEST_F(TestConvolutionFp16, Conv3x3Test1) { TEST_F(TestConvolutionFp16, Conv3x3Test2) { auto conv_param = new ConvParameter(); InitConvParamGroup2Fp16(conv_param); - // todo int thread_count = 1; int tile_num = 16; int output_batch = conv_param->output_batch_; diff --git a/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc b/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc index dc27b89a1b671ff4eeb495c1baed61071b63b779..7ba5ec8b1a1f044cd7de1ae17e769ec800f90728 100644 --- a/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc +++ b/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_bilinear_int8_tests.cc @@ -90,7 +90,7 @@ TEST_F(TestResizeBilinearInt8, Bilinear0) { int8_t expect[16] = {4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 5, 5, 6, 6}; Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, align_corners, thread_num); - kernel_->Init(); // todo delete + kernel_->Init(); kernel_->Run(); CompareOutputInt8(output_data, expect, 16, err_percent_); diff --git a/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc b/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc index 794a348c713cff5942de94ddf662ed874bf1c15c..ce29982f1781f9c1c290d853b42683f46943f860 100644 --- a/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc +++ b/mindspore/lite/test/ut/src/runtime/kernel/arm/int8/resize_nearest_neighbor_int8_tests.cc @@ -92,7 +92,7 @@ TEST_F(TestResizeNearestNeighborInt8, NearestNeighbor0) { err_percent_ = 0.25f; Prepare(in_shape, out_shape, input_data, output_data, quant_in, quant_out, false, thread_num); - kernel_->Init(); // todo delete + kernel_->Init(); kernel_->Run(); CompareOutputInt8(output_data, expect, 16, err_percent_); diff --git a/mindspore/lite/tools/converter/legacy_optimizer/fusion/batchnorm_fold_fusion_pass.cc b/mindspore/lite/tools/converter/legacy_optimizer/fusion/batchnorm_fold_fusion_pass.cc index b5760ece72dea4365a77535367f60e30d19759e8..99789e87e6953643d532a62f28b5f7529c84a86e 100644 --- a/mindspore/lite/tools/converter/legacy_optimizer/fusion/batchnorm_fold_fusion_pass.cc +++ b/mindspore/lite/tools/converter/legacy_optimizer/fusion/batchnorm_fold_fusion_pass.cc @@ -348,7 +348,7 @@ STATUS BatchNormFoldFusionPass::GenNewBiasTensor() { // bias has no quant MS_LOG(ERROR) << "new BiasTensor failed"; return RET_ERROR; } - newBiasTensor->dataType = 0; // todo is float + newBiasTensor->dataType = 0; newBiasTensor->format = Format_NUM_OF_FORMAT; newBiasTensor->refCount = schema::NodeType_ValueNode; newBiasTensor->dims = biasShape; diff --git a/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc b/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc index 95c64a57069b01c104d291685f2be7e6e310bc62..2279e6e1cbe1de4d8192fb421def9929be8a0723 100644 --- a/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc +++ b/mindspore/lite/tools/converter/legacy_optimizer/graph/weight_format_hardcode_pass.cc @@ -29,7 +29,7 @@ void WeightFormatHardCodePass::SetFmkType(converter::FmkType fmkType) { this->fm // pre set tensor format // non quant, filterFormat: // conv deconv depth dedepth -// caffe K(C/g)HW C(K/g)HW / / // todo with deconvOp +// caffe K(C/g)HW C(K/g)HW / / // tf HWCK HWKC HWCK HWKC // onnx K(C/g)HW C(K/g)HW / / diff --git a/mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc b/mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc index 1e29ab1f782818097eb6db9b944968733b378523..84377a99556253d85558247cbf80c3e4c7657ce4 100644 --- a/mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc +++ b/mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc @@ -174,7 +174,6 @@ STATUS CaffeModelParser::ParseLayer(const caffe::NetParameter &proto, const caff break; } } - // todo y00520784 : layer.input_param().shape(0) if (layer.type() == "Input") { std::unique_ptr msTensor = std::make_unique(); for (int j = 0; j < layer.input_param().shape(0).dim_size(); j++) { diff --git a/mindspore/lite/tools/converter/parser/caffe/caffe_scale_parser.cc b/mindspore/lite/tools/converter/parser/caffe/caffe_scale_parser.cc index 8ba3140c91f8fe4729c621acd2b8833830cf73aa..91a5606a887e6fdae5a97250f3164e1b0ee195e3 100644 --- a/mindspore/lite/tools/converter/parser/caffe/caffe_scale_parser.cc +++ b/mindspore/lite/tools/converter/parser/caffe/caffe_scale_parser.cc @@ -43,7 +43,6 @@ STATUS CaffeScaleParser::Parse(const caffe::LayerParameter &proto, const caffe:: attr->axis = axis; // parse scale - // todo expect only weight as scale not bias if (weight.blobs().size() == 1) { auto scale = ConvertWeight(weight.blobs(0)); if (scale == nullptr) { diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_arithmetic_operation_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_arithmetic_operation_parser.cc index a97d62469cf21e55da6d77b76b6ccab1861cf2ad..007419150520feb36c5dbae4197979206abe0b39 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_arithmetic_operation_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_arithmetic_operation_parser.cc @@ -66,8 +66,7 @@ STATUS OnnxDivParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Node STATUS OnnxPowParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::NodeProto &onnx_node, schema::CNodeT *op) { MS_LOG(DEBUG) << "onnx PowParser"; if (op != nullptr) { - // TODO(wangzhe) attr power need populate - std::unique_ptr attr = std::make_unique(); + std::unique_ptr attr(new schema::PowerT()); op->primitive = std::make_unique(); op->primitive->value.type = schema::PrimitiveType_Power; op->primitive->value.value = attr.release(); diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc index fb0e77ebe56512571a22192a2a63b5c2a025665c..02abc62e5066011bc8da0af19ac455d6257e11e2 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_conv_parser.cc @@ -65,7 +65,6 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod MS_LOG(ERROR) << "dilations size " << onnx_node_attr.ints().size() << " is not 2"; return RET_ERROR; } - // TODO(wangzhe) verify the change attr->dilateH = static_cast(onnx_node_attr.ints(0)); attr->dilateW = static_cast(onnx_node_attr.ints(1)); } else if (onnx_node_attr.name() == "kernels") { @@ -80,7 +79,6 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod MS_LOG(ERROR) << "kernel_shape size " << onnx_node_attr.ints().size() << " is not 2"; return RET_ERROR; } - // TODO(wangzhe) verify the change attr->kernelH = static_cast(onnx_node_attr.ints(0)); attr->kernelW = static_cast(onnx_node_attr.ints(1)); } else if (onnx_node_attr.name() == "auto_pad") { @@ -99,7 +97,6 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod MS_LOG(ERROR) << "strides size " << onnx_node_attr.ints().size() << " is not 2"; return RET_ERROR; } - // TODO(wangzhe) verify the change attr->strideH = static_cast(onnx_node_attr.ints(0)); attr->strideW = static_cast(onnx_node_attr.ints(1)); } else if (onnx_node_attr.name() == "order") { @@ -143,7 +140,6 @@ STATUS OnnxConvParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::Nod dims.insert(dims.begin(), iter->ints().begin(), iter->ints().end()); } attr->channelOut = dims[0]; - // TODO(wangzhe) verify this code attr->channelIn = dims[3] * attr->group; } attr->format = schema::Format_NCHW; diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc index 9e0963c80e5f0c7ed129e71b8caa6fb39f0ab722..ab61f64c9738c769a2b8e7c0e9dbb591e39e61b5 100755 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc @@ -241,7 +241,6 @@ STATUS OnnxModelParser::ParseOnnxGivenFillNode(const onnx::NodeProto &onnx_node, std::for_each(shape.begin(), shape.end(), [&data_count](int dim) { data_count *= dim; }); size_t data_size = 0; if (onnx_node.op_type() == "Int8GivenIntTensorFill") { - // todo how to read onnx-ori-dataType tensor->dataType = kNumberTypeInt32; data_size = data_count * sizeof(int32_t) / sizeof(uint8_t); tensor->data.resize(data_size); @@ -252,9 +251,7 @@ STATUS OnnxModelParser::ParseOnnxGivenFillNode(const onnx::NodeProto &onnx_node, castedTensorData[i] = int32_t(iter->ints().data()[i]); } } else if (onnx_node.op_type() == "Int8GivenTensorFill") { - // todo how to read onnx-ori-dataType tensor->dataType = kNumberTypeUInt8; - // todo: add * sizof(string) data_size = data_count; tensor->data.resize(data_size); MS_LOG(DEBUG) << "tensor data size " << data_size << ", s: " << sizeof(iter->s().data()); diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_relu_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_relu_parser.cc index 3de97da060003c6493137abcf7e5be46796f1587..5e2335836665a3808e83163c5ad5ae93f0f92bd1 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_relu_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_relu_parser.cc @@ -65,7 +65,7 @@ STATUS OnnxPReluParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::No if (slope_size == 1) { attr->slope.push_back(*slope_raw_data); attr->channelShared = true; - } else { // TODO(wangzhe) we don't check input tensor's channel size, this may cause problem + } else { attr->slope.resize(slope_size); attr->channelShared = false; if (memcpy_s(attr->slope.data(), slope_size * sizeof(float), slope_raw_data, slope_size * sizeof(float)) != 0) { diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_reshape_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_reshape_parser.cc index 72bf55547a9968b03973485097e6511afe6e5420..d89777598a470aebb7635d9a61e7b3c1a9736358 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_reshape_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_reshape_parser.cc @@ -26,7 +26,6 @@ STATUS OnnxReshapeParser::Parse(const onnx::GraphProto &onnx_graph, const onnx:: std::unique_ptr attr = std::make_unique(); attr->format = schema::Format_NCHW; std::vector params; - // TODO(wangzhe) shape may also come from other op, there need refactor to introduce tensor_cache for (int i = 0; i < onnx_node.input_size(); ++i) { const auto &input_name = onnx_node.input(i); for (const auto &it : onnx_graph.initializer()) { diff --git a/mindspore/lite/tools/converter/parser/tflite/schema.fbs b/mindspore/lite/tools/converter/parser/tflite/schema.fbs index b7f41c756e48ec5b460c89b472624db52a798e08..a8bdf5e067a9cb8c7cad4b6261000d9802618078 100644 --- a/mindspore/lite/tools/converter/parser/tflite/schema.fbs +++ b/mindspore/lite/tools/converter/parser/tflite/schema.fbs @@ -247,7 +247,7 @@ enum BuiltinOperator : byte { SPACE_TO_DEPTH = 26, SVDF = 27, TANH = 28, - // TODO(aselle): Consider rename to CONCATENATE_EMBEDDINGS + // Consider rename to CONCATENATE_EMBEDDINGS CONCAT_EMBEDDINGS = 29, SKIP_GRAM = 30, CALL = 31, diff --git a/mindspore/lite/tools/converter/quantizer/calc_quant_param.cc b/mindspore/lite/tools/converter/quantizer/calc_quant_param.cc index 5d129b0b76abbd39fdeccba356e2204ba86e0c80..042c9c96b0e6e6719ffcaeaf4dbb0b0f0c552ee1 100644 --- a/mindspore/lite/tools/converter/quantizer/calc_quant_param.cc +++ b/mindspore/lite/tools/converter/quantizer/calc_quant_param.cc @@ -168,7 +168,6 @@ int LinearCalcer::Calc(MetaGraphT *graph, const CNodeT &node) { if (outQuantParam->inited) { continue; } - // todo copy quant params outTensor->quantParams.front() = std::move(outQuantParam); } } diff --git a/mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc b/mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc index 4d9b1079b0d7f2672a119b34aee97ddeae45c983..f08ab41cd645f7f87d88dfec3ced3fe37cf48a3b 100644 --- a/mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc +++ b/mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc @@ -802,7 +802,6 @@ STATUS PostTrainingQuantizer::CheckTensorVec(const std::string &nodeName, **/ STATUS PostTrainingQuantizer::DoInference() { for (size_t i = 0; i < calibrator_->GetBatchNum(); i++) { - // TODO(x) when model has inputs count > 1 // get input tensor vector inputs = session_->GetInputs(); if (inputs.size() > 1) { @@ -854,7 +853,6 @@ STATUS PostTrainingQuantizer::DoInference() { STATUS PostTrainingQuantizer::CollectDataFrequency() { for (size_t i = 0; i < calibrator_->GetBatchNum(); i++) { - // TODO(x) when model has inputs count > 1 // get input tensor vector inputs = session_->GetInputs(); if (inputs.size() > 1) { diff --git a/mindspore/lite/tools/optimizer/common/node_pass_extends.cc b/mindspore/lite/tools/optimizer/common/node_pass_extends.cc index e5ee11d62fe00d8e83d77236acd28c34cd22bc30..d5e73c409da40f1cfacfffed14adc387310b599c 100644 --- a/mindspore/lite/tools/optimizer/common/node_pass_extends.cc +++ b/mindspore/lite/tools/optimizer/common/node_pass_extends.cc @@ -33,11 +33,11 @@ bool NodePass::Run(const FuncGraphPtr &func_graph) { manager->AddFuncGraph(func_graph); std::unordered_set seen_node; - std::deque todo{func_graph->output()}; + std::deque to_process{func_graph->output()}; bool changes = false; - while (!todo.empty()) { - AnfNodePtr node = todo.front(); - todo.pop_front(); + while (!to_process.empty()) { + AnfNodePtr node = to_process.front(); + to_process.pop_front(); if (seen_node.count(node) > 0 || !manager->all_nodes().contains(node)) { continue; } @@ -53,15 +53,15 @@ bool NodePass::Run(const FuncGraphPtr &func_graph) { if (new_node && IsValueNode(new_node)) { auto const_func_graph = GetValueNode(new_node); MS_EXCEPTION_IF_NULL(const_func_graph); - todo.push_back(const_func_graph->output()); + to_process.push_back(const_func_graph->output()); } else if (new_node && new_node->isa()) { if (IsGraphKernel(new_node)) { - todo.push_back(new_node); + to_process.push_back(new_node); } auto cnode = new_node->cast(); MS_EXCEPTION_IF_NULL(cnode); auto inputs = cnode->inputs(); - (void)todo.insert(todo.end(), inputs.begin(), inputs.end()); + (void)to_process.insert(to_process.end(), inputs.begin(), inputs.end()); } changes = changes || change; }