/third_party/mindspore/mindspore/lite/tools/anf_exporter/ |
D | fetch_content.cc | 115 bool train_flag, DataInfo *data_info) { in FetchFromTensorValue() argument 116 MS_ASSERT(value_node != nullptr && primitive != nullptr && data_info != nullptr); in FetchFromTensorValue() 126 data_info->data_type_ = typePtr->type_id(); in FetchFromTensorValue() 129 data_info->shape_ = dims; in FetchFromTensorValue() 131 data_info->shape_ = {1}; in FetchFromTensorValue() 137 data_info->data_.resize(data->Size()); in FetchFromTensorValue() 138 if (data_info->format_ != mindspore::NHWC && data_info->format_ != mindspore::NCHW) { in FetchFromTensorValue() 139 MS_LOG(ERROR) << "schema tensor format is wrong, " << data_info->format_; in FetchFromTensorValue() 144 …if (data->Size() > 0 && memcpy_s(data_info->data_.data(), data->Size(), data->data_c(), data->Size… in FetchFromTensorValue() 151 …Int64ImmValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, DataInfo *data_info) { in FetchFromInt32OrInt64ImmValue() argument [all …]
|
D | fetch_content.h | 39 …aultParam(const ParameterPtr ¶m_node, const converter::FmkType &fmk_type, DataInfo *data_info); 42 DataInfo *data_info); 44 DataInfo *data_info); 46 DataInfo *data_info);
|
D | anf_exporter.cc | 228 lite::DataInfo data_info; in CreateNewTensorForParameter() local 231 …if (FetchFromDefaultParam(param_node, converter::FmkType(meta_graphT->fmkType), &data_info) != RET… in CreateNewTensorForParameter() 237 schema_tensor->format = static_cast<schema::Format>(data_info.format_); in CreateNewTensorForParameter() 239 schema_tensor->dims = data_info.shape_; in CreateNewTensorForParameter() 240 schema_tensor->dataType = data_info.data_type_; in CreateNewTensorForParameter() 241 schema_tensor->data = data_info.data_; in CreateNewTensorForParameter() 242 schema_tensor->enableHuffmanCode = data_info.enable_huffman_code_; in CreateNewTensorForParameter() 691 DataInfo data_info; in ConvertInputParameter() local 692 …omParameterNode(cnode, index, converter::FmkType(meta_graphT->fmkType), train_flag_, &data_info) != in ConvertInputParameter() 699 schema_tensor->format = static_cast<schema::Format>(data_info.format_); in ConvertInputParameter() [all …]
|
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/ |
D | node_infershape.cc | 181 lite::DataInfo data_info; in GetInputShape() local 191 status = lite::FetchDataFromCNode(base_node, position, fmk_type_, train_flag_, &data_info); in GetInputShape() 193 …status = lite::FetchDataFromParameterNode(base_node, position, fmk_type_, train_flag_, &data_info); in GetInputShape() 195 status = lite::FetchDataFromValueNode(base_node, position, fmk_type_, train_flag_, &data_info); in GetInputShape() 204 return data_info.shape_; in GetInputShape() 299 lite::DataInfo data_info; in GetCNodeConstInput() local 301 status = lite::FetchDataFromParameterNode(cnode, i, fmk_type_, train_flag_, &data_info); in GetCNodeConstInput() 303 status = lite::FetchDataFromValueNode(cnode, i, fmk_type_, train_flag_, &data_info); in GetCNodeConstInput() 312 data_infos.emplace_back(data_info); in GetCNodeConstInput() 324 lite::DataInfo data_info; in GetCNodeVarInput() local [all …]
|
D | decrease_transpose_algo.cc | 155 lite::DataInfo data_info; in ConvertTensorToNCOrNH() local 163 status = lite::FetchDataFromParameterNode(cnode, index, fmk_type, train_flag, &data_info); in ConvertTensorToNCOrNH() 165 status = lite::FetchDataFromValueNode(cnode, index, fmk_type, train_flag, &data_info); in ConvertTensorToNCOrNH() 170 if (data_info.shape_.empty() || in ConvertTensorToNCOrNH() 171 (data_info.data_type_ != kNumberTypeFloat32 && data_info.data_type_ != kNumberTypeFloat)) { in ConvertTensorToNCOrNH() 174 ShapeVector expand_shape(data_info.shape_.begin(), data_info.shape_.end()); in ConvertTensorToNCOrNH() 175 if (data_info.shape_.size() == 1) { in ConvertTensorToNCOrNH() 176 expand_shape = {1, 1, 1, data_info.shape_[0]}; in ConvertTensorToNCOrNH() 177 } else if (data_info.shape_.size() == kInputSizeTwo) { in ConvertTensorToNCOrNH() 178 expand_shape = {1, 1, data_info.shape_[0], data_info.shape_[1]}; in ConvertTensorToNCOrNH() [all …]
|
D | redundant_op_remove_pass.cc | 267 …emoveRedundantOpPass::GetConstDataFromInputNode(const CNodePtr &cnode, lite::DataInfo *data_info) { in GetConstDataFromInputNode() argument 269 MS_ASSERT(data_info != nullptr); in GetConstDataFromInputNode() 273 … auto status = lite::FetchDataFromParameterNode(cnode, 2, converter::kFmkTypeMs, false, data_info); in GetConstDataFromInputNode() 279 auto status = lite::FetchDataFromValueNode(cnode, 2, converter::kFmkTypeMs, false, data_info); in GetConstDataFromInputNode() 302 lite::DataInfo data_info; in RemoveInvalidPadOp() local 303 if (GetConstDataFromInputNode(cnode, &data_info) != RET_OK) { in RemoveInvalidPadOp() 307 if (!data_info.data_.empty()) { in RemoveInvalidPadOp() 308 auto pad_data = reinterpret_cast<int *>(data_info.data_.data()); in RemoveInvalidPadOp() 309 size_t num = data_info.data_.size() / sizeof(int); in RemoveInvalidPadOp()
|
D | infershape_pass.cc | 273 lite::DataInfo data_info; in SetSubGraphInput() local 280 auto status = lite::FetchDataFromValueNode(cnode, index, fmk_type_, train_flag_, &data_info); in SetSubGraphInput() 284 ShapeVector shape_vec(data_info.shape_.begin(), data_info.shape_.end()); in SetSubGraphInput() 285 if (data_info.data_.empty()) { in SetSubGraphInput() 286 … auto tensor_info = std::make_shared<tensor::Tensor>((TypeId)data_info.data_type_, shape_vec); in SetSubGraphInput() 290 auto tensor_info = std::make_shared<tensor::Tensor>((TypeId)data_info.data_type_, shape_vec, in SetSubGraphInput() 291 … data_info.data_.data(), data_info.data_.size()); in SetSubGraphInput()
|
D | transpose_strategy.cc | 212 lite::DataInfo data_info; in ChangeOpPad() local 215 … lite::FetchDataFromParameterNode(cnode, kInputIndexTwo, converter::kFmkTypeMs, false, &data_info); in ChangeOpPad() 217 …us = lite::FetchDataFromValueNode(cnode, kInputIndexTwo, converter::kFmkTypeMs, false, &data_info); in ChangeOpPad() 225 …if (std::accumulate(data_info.shape_.begin(), data_info.shape_.end(), 1, std::multiplies<int>()) != in ChangeOpPad() 230 auto data = reinterpret_cast<int32_t *>(data_info.data_.data()); in ChangeOpPad()
|
D | redundant_op_remove_pass.h | 42 int GetConstDataFromInputNode(const CNodePtr &cnode, lite::DataInfo *data_info);
|
D | node_infershape.h | 51 lite::Tensor *GetCNodeTensorListVarInput(const lite::DataInfo &data_info);
|
/third_party/mindspore/mindspore/lite/tools/optimizer/common/ |
D | format_utils.cc | 133 lite::DataInfo data_info; in GetTransposePerm() local 136 … lite::FetchDataFromParameterNode(cnode, kInputIndexTwo, converter::kFmkTypeMs, false, &data_info); in GetTransposePerm() 138 …us = lite::FetchDataFromValueNode(cnode, kInputIndexTwo, converter::kFmkTypeMs, false, &data_info); in GetTransposePerm() 144 if ((data_info.data_type_ != kNumberTypeInt && data_info.data_type_ != kNumberTypeInt32) || in GetTransposePerm() 145 data_info.shape_.size() != 1) { in GetTransposePerm() 149 perm->resize(data_info.shape_[0]); in GetTransposePerm() 150 if (!data_info.data_.empty() && in GetTransposePerm() 151 …memcpy_s(perm->data(), perm->size() * sizeof(int), data_info.data_.data(), data_info.data_.size())… in GetTransposePerm()
|
/third_party/mindspore/mindspore/lite/tools/converter/ |
D | export_model.cc | 86 DataInfo data_info; in CloneParameterAndValueNode() local 89 status = FetchDataFromParameterNode(cnode, index, flags->fmk, flags->trainModel, &data_info); in CloneParameterAndValueNode() 91 status = FetchDataFromValueNode(cnode, index, flags->fmk, flags->trainModel, &data_info); in CloneParameterAndValueNode() 99 if (opt::CheckPrimitiveType(cnode, prim::kPrimTupleGetItem) && !data_info.data_.empty()) { in CloneParameterAndValueNode() 100 return NewValueNode(MakeValue<int>(*reinterpret_cast<int *>(data_info.data_.data()))); in CloneParameterAndValueNode() 102 ShapeVector shape_vec(data_info.shape_.begin(), data_info.shape_.end()); in CloneParameterAndValueNode() 103 …auto tensor_info = std::make_shared<tensor::Tensor>(static_cast<TypeId>(data_info.data_type_), sha… in CloneParameterAndValueNode() 105 if (!data_info.data_.empty()) { in CloneParameterAndValueNode() 107 …if (memcpy_s(tensor_data, tensor_info->data().nbytes(), data_info.data_.data(), data_info.data_.si… in CloneParameterAndValueNode()
|
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/ |
D | constant_folding_fusion.cc | 61 lite::DataInfo data_info; in GetCNodeInputTensors() local 80 status = lite::FetchDataFromParameterNode(cnode, i, fmk_type, false, &data_info); in GetCNodeInputTensors() 88 status = lite::FetchDataFromParameterNode(cnode, i, fmk_type, false, &data_info); in GetCNodeInputTensors() 90 status = lite::FetchDataFromValueNode(cnode, i, fmk_type, false, &data_info); in GetCNodeInputTensors() 104 if (data_info.shape_.empty() && data_info.data_.empty()) { in GetCNodeInputTensors() 110 …Tensor(TypeId(data_info.data_type_), data_info.shape_, static_cast<mindspore::Format>(data_info.fo… in GetCNodeInputTensors() 111 …lite::TensorCategory(0, data_info.shape_.size(), TypeId(data_info.data_type_), data_info.data_.siz… in GetCNodeInputTensors() 117 if (data_info.data_.empty()) { in GetCNodeInputTensors() 127 …if (memcpy_s(tensor_data, tensor->Size(), data_info.data_.data(), data_info.data_.size()) != EOK) { in GetCNodeInputTensors()
|
/third_party/mindspore/mindspore/lite/tools/converter/parser/ |
D | lstm_adjust_pass.cc | 170 lite::DataInfo data_info; in ReplaceLstmNode() local 172 …FetchDataFromParameterNode(lstm_cnode, kLSTMWeightIndex, converter::kFmkTypeMs, false, &data_info); in ReplaceLstmNode() 178 …t = FetchDataFromValueNode(lstm_cnode, kLSTMWeightIndex, converter::kFmkTypeMs, false, &data_info); in ReplaceLstmNode() 186 if (data_info.data_type_ != kNumberTypeFloat32) { in ReplaceLstmNode() 190 auto data_type = static_cast<TypeId>(data_info.data_type_); in ReplaceLstmNode() 191 auto *flatten_weight = reinterpret_cast<char *>(data_info.data_.data()); in ReplaceLstmNode()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/datasetops/ |
D | device_queue_op.cc | 333 DATA_INFO data_info; in SendRowToTdt() local 334 (void)std::transform(curr_row.begin(), curr_row.end(), std::back_inserter(data_info), in SendRowToTdt() 336 RETURN_IF_NOT_OK(data_info_queue_ptr_->Add(data_info)); in SendRowToTdt() 343 Status DeviceQueueOp::GetDataInfo(DATA_INFO *data_info) { in GetDataInfo() argument 356 RETURN_IF_NOT_OK(data_info_queue_ptr_->PopFront(data_info)); in GetDataInfo() 360 Status DeviceQueueOp::GetDataInfo(DATA_INFO *data_info) { in GetDataInfo() argument
|
D | device_queue_op.h | 92 Status GetDataInfo(DATA_INFO *data_info);
|
/third_party/python/Lib/ |
D | codecs.py | 946 data_info = lookup(data_encoding) 948 sr = StreamRecoder(file, data_info.encode, data_info.decode,
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/consumers/ |
D | tree_consumer.cc | 188 DATA_INFO data_info; in GetDataInfo() local 189 RETURN_IF_NOT_OK(op->GetDataInfo(&data_info)); in GetDataInfo() 190 for (auto el : data_info) { in GetDataInfo()
|