/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/ |
D | onnx_inputs_adjust.cc | 55 auto param_node = in AddAttrToInput() local 57 inputs.push_back(param_node); in AddAttrToInput() 61 tr.AddEdge(cnode, param_node); in AddAttrToInput() 72 STATUS ReplaceInt64ParameterNode(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node) { in ReplaceInt64ParameterNode() argument 74 MS_ASSERT(param_node != nullptr); in ReplaceInt64ParameterNode() 75 if (param_node->abstract() == nullptr) { in ReplaceInt64ParameterNode() 79 auto abstract_tensor = param_node->abstract()->cast<abstract::AbstractTensorPtr>(); in ReplaceInt64ParameterNode() 94 if (param_node->has_default()) { in ReplaceInt64ParameterNode() 95 auto default_value = param_node->default_param(); in ReplaceInt64ParameterNode() 102 auto param_node_new = opt::BuildParameterNode(func_graph, param_node, tensor_info); in ReplaceInt64ParameterNode() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/quantizer/ |
D | weight_quantizer.cc | 61 … WeightQuantizer::SetAbstract(const tensor::TensorPtr &tensor_info, const ParameterPtr ¶m_node, in SetAbstract() argument 64 MS_CHECK_TRUE_MSG(param_node != nullptr, RET_NULL_PTR, "param_node is nullptr."); in SetAbstract() 69 auto abstract_base = param_node->abstract(); in SetAbstract() 71 MS_LOG(ERROR) << "Abstract of parameter is nullptr, " << param_node->name(); in SetAbstract() 75 MS_LOG(ERROR) << "Abstract of parameter should be anstract tensor, " << param_node->name(); in SetAbstract() 84 weight_quantized_tensors_.insert({tensor_info, param_node}); in SetAbstract() 100 ParameterPtr param_node; in DoConvQuantize() local 103 GetLiteParameter(input_node, ¶m_node, &tensor_info); in DoConvQuantize() 104 if (param_node == nullptr || tensor_info == nullptr) { in DoConvQuantize() 131 status = SetAbstract(tensor_info, param_node, primitive); in DoConvQuantize() [all …]
|
D | quantize_util.cc | 604 auto param_node = input_node->cast<ParameterPtr>(); in CopyFuncGraph() local 605 if (!param_node->has_default()) { in CopyFuncGraph() 609 … auto old_tensor_info = std::static_pointer_cast<tensor::Tensor>(param_node->default_param()); in CopyFuncGraph() 620 auto status = lite::InitParameterFromTensorInfo(param_node, new_tensor_info); in CopyFuncGraph() 631 void GetLiteParameter(const AnfNodePtr &node, ParameterPtr *param_node, tensor::TensorPtr *tensor_i… in GetLiteParameter() argument 638 *param_node = node->cast<ParameterPtr>(); in GetLiteParameter() 639 if (*param_node == nullptr) { in GetLiteParameter() 643 if (!(*param_node)->has_default()) { in GetLiteParameter() 648 *tensor_info = std::static_pointer_cast<tensor::Tensor>((*param_node)->default_param()); in GetLiteParameter()
|
D | weight_quantizer.h | 64 STATUS SetAbstract(const tensor::TensorPtr &tensor_info, const ParameterPtr ¶m_node,
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/tflite/ |
D | tflite_inputs_adjust.cc | 92 …Adjust::ReplaceInt64ParameterNode(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node) { in ReplaceInt64ParameterNode() argument 94 MSLITE_CHECK_PTR(param_node); in ReplaceInt64ParameterNode() 95 if (param_node->abstract() == nullptr) { in ReplaceInt64ParameterNode() 99 auto abstract_tensor = param_node->abstract()->cast<abstract::AbstractTensorPtr>(); in ReplaceInt64ParameterNode() 114 if (param_node->has_default()) { in ReplaceInt64ParameterNode() 115 auto default_value = param_node->default_param(); in ReplaceInt64ParameterNode() 125 auto param_node_new = opt::BuildParameterNode(func_graph, param_node, tensor_info); in ReplaceInt64ParameterNode() 126 manager->Replace(param_node, param_node_new); in ReplaceInt64ParameterNode() 129 param_node->abstract()->set_type(TypeIdToType(kNumberTypeInt32)); in ReplaceInt64ParameterNode()
|
D | tflite_inputs_adjust.h | 30 STATUS ReplaceInt64ParameterNode(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node);
|
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ |
D | context.cc | 232 … const ParameterPtr ¶m_node, const AbstractBasePtr &ptr) { in ParallelParameterContextRestoreShape() argument 234 MS_EXCEPTION_IF_NULL(param_node); in ParallelParameterContextRestoreShape() 243 auto iter = param_shapes.find(param_node->name()); in ParallelParameterContextRestoreShape() 245 MS_LOG(WARNING) << "Can not found the shape for parameter " << param_node->name(); in ParallelParameterContextRestoreShape() 251 MS_LOG(INFO) << "The parameter name is " << param_node->name() << ", the shape is " << shape; in ParallelParameterContextRestoreShape() 256 …::ParallelParameterContextCkptShape(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node, in ParallelParameterContextCkptShape() argument 259 MS_EXCEPTION_IF_NULL(param_node); in ParallelParameterContextCkptShape() 269 auto ret = param_shapes.try_emplace(param_node->name(), shape); in ParallelParameterContextCkptShape() 271 MS_LOG(EXCEPTION) << "The shape for parameter name " << param_node->name() << " is existed"; in ParallelParameterContextCkptShape() 275 MS_LOG(DEBUG) << "The parameter name is " << param_node->name() << ", the shape is " << shape; in ParallelParameterContextCkptShape()
|
D | context.h | 137 …arallelParameterContextRestoreShape(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node, 139 …d ParallelParameterContextCkptShape(const FuncGraphPtr &func_graph, const ParameterPtr ¶m_node,
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/ |
D | param_replace.h | 43 auto param_node = node->cast<ParameterPtr>(); in operator() local 44 if (param_node == nullptr || !param_node->has_default() || node->func_graph() == top_graph) { in operator() 47 auto para_name = param_node->name(); in operator()
|
/third_party/mindspore/mindspore/core/ir/ |
D | func_graph_extends.cc | 132 AnfNodePtr param_node = specialized_graph->GetParameterByName(kw_param_name); in GenerateKwParams() local 134 if (param_node == nullptr) { in GenerateKwParams() 159 …tr = std::find(specialized_parameter_list->begin(), specialized_parameter_list->end(), param_node); in GenerateKwParams() 161 …if (node_itr != specialized_parameter_list->end() && kwarg_nodes.find(param_node) == kwarg_nodes.e… in GenerateKwParams() 164 specialized_parameter_list->push_back(param_node); in GenerateKwParams() 166 {NewValueNode(prim::kPrimExtractKeywordArg), NewValueNode(kw_param_name), param_node}); in GenerateKwParams() 167 kwarg_nodes.insert(param_node); in GenerateKwParams() 168 (void)repl_nodes->emplace(param_node, extract_node); in GenerateKwParams() 210 auto param_node = specialized_graph->parameters()[i]->cast<ParameterPtr>(); in GenerateDefaultValue() local 211 MS_EXCEPTION_IF_NULL(param_node); in GenerateDefaultValue() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/ |
D | inputs_adjust.cc | 53 AnfNodePtr param_node = nullptr; in AddAttrToInput() local 58 param_node = in AddAttrToInput() 64 param_node = in AddAttrToInput() 70 param_node = in AddAttrToInput() 76 param_node = in AddAttrToInput() 82 param_node = in AddAttrToInput() 94 tr.AddEdge(cnode, param_node); in AddAttrToInput()
|
/third_party/mindspore/mindspore/lite/tools/optimizer/common/ |
D | gllo_utils.cc | 897 auto param_node = func_graph->add_parameter(); in BuildParameterNode() local 898 MS_CHECK_TRUE_RET(param_node != nullptr, nullptr); in BuildParameterNode() 904 param_node->set_name(node->fullname_with_scope()); in BuildParameterNode() 912 auto status = lite::InitParameterFromTensorInfo(param_node, tensor_info_new); in BuildParameterNode() 917 return param_node; in BuildParameterNode() 946 auto status = lite::InitParameterFromTensorInfo(param_node, tensor_info_new); in BuildParameterNode() 951 param_node->set_default_param(tensor_info_new); in BuildParameterNode() 952 return param_node; in BuildParameterNode() 958 auto param_node = func_graph->add_parameter(); in BuildIntValueParameterNode() local 959 MS_CHECK_TRUE_RET(param_node != nullptr, nullptr); in BuildIntValueParameterNode() [all …]
|
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/ |
D | infershape_pass.cc | 239 auto param_node = node->cast<ParameterPtr>(); in SetSubGraphInput() local 240 MS_ASSERT(param_node != nullptr); in SetSubGraphInput() 252 param_node->set_abstract(opt::GetCNodeInputAbstract(cnode, index)->Clone()); in SetSubGraphInput() 262 param_node->abstract()->set_shape(abstract_shape); in SetSubGraphInput() 269 if (ModifySubGraphInputCNodeFormat(sub_graph, param_node, format) != lite::RET_OK) { in SetSubGraphInput() 276 param_node->set_default_param(cnode->input(index)->cast<ParameterPtr>()->default_param()); in SetSubGraphInput() 288 param_node->set_default_param(tensor_info); in SetSubGraphInput() 293 param_node->set_default_param(tensor_info); in SetSubGraphInput() 390 auto param_node = sub_graph->add_parameter(); in ResetSubGraphInput() local 391 MS_CHECK_TRUE_MSG(param_node != nullptr, RET_ERROR, "Add parameter Failed"); in ResetSubGraphInput() [all …]
|
D | decrease_transpose_algo.cc | 190 auto param_node = func_graph->add_parameter(); in ConvertTensorToNCOrNH() local 191 MS_CHECK_TRUE_MSG(param_node != nullptr, lite::RET_ERROR, "add_parameter failed"); in ConvertTensorToNCOrNH() 192 param_node->set_name(cnode->input(index)->fullname_with_scope()); in ConvertTensorToNCOrNH() 193 status = lite::InitParameterFromTensorInfo(param_node, tensor); in ConvertTensorToNCOrNH() 199 tr.SetEdge(cnode, index, param_node); in ConvertTensorToNCOrNH() 481 auto param_node = node->cast<ParameterPtr>(); in SetSubGraphInput() local 482 MS_ASSERT(param_node != nullptr); in SetSubGraphInput() 494 param_node->set_abstract(GetCNodeInputAbstract(cnode, index)->Clone()); in SetSubGraphInput() 503 param_node->abstract()->set_shape(std::make_shared<abstract::Shape>(shape_vec)); in SetSubGraphInput() 509 param_node->set_default_param(cnode->input(index)->cast<ParameterPtr>()->default_param()); in SetSubGraphInput() [all …]
|
D | transpose_strategy.cc | 121 …auto param_node = BuildIntVecParameterNode(func_graph, cur_input, cnode->input(input_index)->fulln… in TransformAttrByAxes() local 122 MS_CHECK_TRUE_MSG(param_node != nullptr, lite::RET_ERROR, "BuildIntVecParameterNode failed"); in TransformAttrByAxes() 123 func_graph->manager()->Replace(cnode->input(input_index), param_node); in TransformAttrByAxes() 244 auto param_node = in ChangeOpPad() local 246 MS_CHECK_TRUE_MSG(param_node != nullptr, lite::RET_NULL_PTR, "BuildParameterNode Failed"); in ChangeOpPad() 249 manager->Replace(cnode->input(kInputIndexTwo), param_node); in ChangeOpPad() 332 auto param_node = in ChangeOpStrideSlice() local 334 MS_CHECK_TRUE_MSG(param_node != nullptr, RET_ERROR, "BuildIntVecParameterNode failed"); in ChangeOpStrideSlice() 337 manager->Replace(cnode->input(kInputIndexFour), param_node); in ChangeOpStrideSlice()
|
/third_party/mindspore/mindspore/lite/tools/anf_exporter/ |
D | fetch_content.cc | 90 STATUS GetDataTypeAndShape(const ParameterPtr ¶m_node, TypeId *data_type, ShapeVector *shape_ve… in GetDataTypeAndShape() argument 91 MS_ASSERT(param_node != nullptr && data_type != nullptr && shape_vector != nullptr); in GetDataTypeAndShape() 92 auto abstract_base = param_node->abstract(); in GetDataTypeAndShape() 94 MS_LOG(ERROR) << "Abstract of parameter is nullptr, " << param_node->name(); in GetDataTypeAndShape() 98 MS_LOG(ERROR) << "Abstract of parameter should be anstract tensor, " << param_node->name(); in GetDataTypeAndShape() 107 MS_LOG(ERROR) << "Shape of Abstract of parameter should be ShapePtr, " << param_node->name(); in GetDataTypeAndShape() 234 int FetchFromDefaultParam(const ParameterPtr ¶m_node, const converter::FmkType &fmk_type, DataI… in FetchFromDefaultParam() argument 235 MS_ASSERT(param_node != nullptr && data_info != nullptr); in FetchFromDefaultParam() 238 auto status = GetDataTypeAndShape(param_node, &data_type, &shape_vector); in FetchFromDefaultParam() 244 auto tensor_info = std::dynamic_pointer_cast<tensor::Tensor>(param_node->default_param()); in FetchFromDefaultParam() [all …]
|
D | anf_exporter.cc | 229 auto param_node = input->cast<ParameterPtr>(); in CreateNewTensorForParameter() local 230 MS_CHECK_TRUE_MSG(param_node != nullptr, RET_NULL_PTR, "cast ptr failed"); in CreateNewTensorForParameter() 231 …if (FetchFromDefaultParam(param_node, converter::FmkType(meta_graphT->fmkType), &data_info) != RET… in CreateNewTensorForParameter() 238 schema_tensor->name = param_node->name(); in CreateNewTensorForParameter() 684 auto param_node = cnode->input(index)->cast<ParameterPtr>(); in ConvertInputParameter() local 685 MS_ASSERT(param_node != nullptr); in ConvertInputParameter() 686 auto key = std::make_pair(param_node, 0); in ConvertInputParameter() 700 schema_tensor->name = param_node->name(); in ConvertInputParameter() 704 if (param_node->has_default()) { in ConvertInputParameter()
|
D | fetch_content.h | 39 int FetchFromDefaultParam(const ParameterPtr ¶m_node, const converter::FmkType &fmk_type, DataI…
|
/third_party/mindspore/mindspore/ccsrc/utils/ |
D | callbacks_ge.cc | 48 ParameterPtr param_node = std::static_pointer_cast<Parameter>(node); in GetParameterShape() local 49 if (param_node == nullptr) { in GetParameterShape() 53 if (param_node->name() == param_name) { in GetParameterShape() 55 if (param_node->has_default()) { in GetParameterShape() 56 tensor = std::dynamic_pointer_cast<tensor::Tensor>(param_node->default_param()); in GetParameterShape()
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ps/ |
D | pull_kernel.h | 62 auto param_node = AnfAlgo::GetInputNode(kernel_node, 1); in Init() local 63 MS_EXCEPTION_IF_NULL(param_node); in Init() 64 param_name_ = param_node->fullname_with_scope(); in Init()
|
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/ |
D | action.cc | 64 auto param_node = param->cast<ParameterPtr>(); in UpdateFuncGraphParameter() local 65 MS_EXCEPTION_IF_NULL(param_node); in UpdateFuncGraphParameter() 66 if (param_node->has_default()) { in UpdateFuncGraphParameter() 67 new_paras.push_back(param_node); in UpdateFuncGraphParameter() 70 AbstractBasePtr par_abs = param_node->abstract(); in UpdateFuncGraphParameter() 75 new_paras.push_back(param_node); in UpdateFuncGraphParameter() 515 auto param_node = std::static_pointer_cast<Parameter>(param); in AbstractSpecializeAction() local 516 MS_EXCEPTION_IF_NULL(param_node); in AbstractSpecializeAction() 517 if (param_node->has_default()) { in AbstractSpecializeAction() 518 auto value = param_node->default_param(); in AbstractSpecializeAction() [all …]
|
/third_party/mindspore/mindspore/lite/tools/converter/acl/mapper/ |
D | primitive_mapper.cc | 180 auto param_node = in AddAttrToInput() local 182 inputs.push_back(param_node); in AddAttrToInput() 187 auto param_node = in AddAttrToInput() local 189 inputs.push_back(param_node); in AddAttrToInput()
|
/third_party/mindspore/mindspore/ccsrc/fl/server/ |
D | common.h | 244 auto param_node = in GenerateParameterNodeAddrPtr() local 246 MS_ERROR_IF_NULL_W_RET_VAL(param_node, nullptr); in GenerateParameterNodeAddrPtr() 247 auto param_tensor = param_node->default_param()->cast<tensor::TensorPtr>(); in GenerateParameterNodeAddrPtr()
|
/third_party/mindspore/mindspore/lite/tools/common/ |
D | tensor_util.cc | 181 int InitParameterFromTensorInfo(const ParameterPtr ¶m_node, const tensor::TensorPtr &tensor_inf… in InitParameterFromTensorInfo() argument 191 param_node->set_abstract(abstract_tensor); in InitParameterFromTensorInfo() 192 param_node->set_default_param(tensor_info); in InitParameterFromTensorInfo()
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ |
D | py_pass.cc | 224 auto param_node = param->cast<ParameterPtr>(); in ReflectParamBackToPython() local 225 MS_EXCEPTION_IF_NULL(param_node); in ReflectParamBackToPython() 226 param_node->set_default_param(param_value); in ReflectParamBackToPython()
|