Home
last modified time | relevance | path

Searched refs:origin_tensor (Results 1 – 8 of 8) sorted by relevance

/third_party/mindspore/mindspore/lite/micro/coder/
Dgraph.cc65 schema::Tensor *origin_tensor = model_->all_tensors_.at(i); in ConvertTensors() local
66 MS_CHECK_PTR_WITH_EXE(origin_tensor, clear_tensors()); in ConvertTensors()
69 if (origin_tensor->dims() != nullptr) { in ConvertTensors()
70 for (uint32_t j = 0; j < origin_tensor->dims()->size(); j++) { in ConvertTensors()
71 MS_CHECK_PTR(origin_tensor->dims()->data()); in ConvertTensors()
72 int dim = static_cast<int>(origin_tensor->dims()->data()[j]); in ConvertTensors()
81 int origin_data_type = static_cast<int>(origin_tensor->dataType()); in ConvertTensors()
83 …lite::Tensor(TypeId(origin_data_type), shape, static_cast<mindspore::Format>(origin_tensor->format… in ConvertTensors()
84 TensorCategory(origin_tensor)); in ConvertTensors()
86 if (origin_tensor->nodeType() == NodeType_ValueNode && origin_tensor->data() != nullptr && in ConvertTensors()
[all …]
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/
Dtf_lstm_cell_fusion.cc241 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(weight_param->default_param()); in SplitWeights() local
242 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in SplitWeights()
246 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in SplitWeights()
247 auto data_shape = origin_tensor->shape(); in SplitWeights()
294 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(old_bias_param->default_param()); in PopulateBiasNode() local
295 MS_CHECK_TRUE_RET(origin_tensor != nullptr, RET_ERROR); in PopulateBiasNode()
296 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in PopulateBiasNode()
300 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in PopulateBiasNode()
302 auto data_shape = origin_tensor->shape(); in PopulateBiasNode()
Dconv_bn_fusion.cc124 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(origin_param); in CalEstimatedData() local
125 MS_CHECK_TRUE_RET(origin_tensor != nullptr, RET_ERROR); in CalEstimatedData()
126 auto origin_data = reinterpret_cast<float *>(origin_tensor->data_c()); in CalEstimatedData()
138 for (int i = 0; i < origin_tensor->DataSize(); i++) { in CalEstimatedData()
Dtflite_lstm_cell_fusion.cc440 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(param_t->default_param()); in GetConcatedParam() local
441 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in GetConcatedParam()
445 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in GetConcatedParam()
446 auto data_shape = origin_tensor->shape(); in GetConcatedParam()
/third_party/mindspore/mindspore/lite/src/delegate/npu/
Dnpu_subgraph.cc51 auto origin_tensor = inputs_[index]; in set_input() local
55 if (op->inputs()[i] == origin_tensor) { in set_input()
65 auto origin_tensor = outputs_[index]; in set_output() local
67 if (out_tensor_sorted_[i] == origin_tensor) { in set_output()
Dnpu_graph.cc38 auto origin_tensor = this->inputs_[index]; in set_input() local
41 if (kernel->inputs()[i] == origin_tensor) { in set_input()
51 auto origin_tensor = this->outputs_[index]; in set_output() local
54 if (kernel->outputs()[i] == origin_tensor) { in set_output()
/third_party/mindspore/mindspore/lite/src/train/
Dtrain_session.cc295 auto *origin_tensor = restored_origin_tensor.first; in RestoreTensorData() local
297 MS_ASSERT(origin_tensor != nullptr); in RestoreTensorData()
301 if (origin_tensor->data() == nullptr) { in RestoreTensorData()
304 origin_tensor->FreeData(); in RestoreTensorData()
306 origin_tensor->set_data_type(restored_tensor->data_type()); in RestoreTensorData()
307 origin_tensor->set_data(restored_tensor->data()); in RestoreTensorData()
308 origin_tensor->set_own_data(own_data); in RestoreTensorData()
/third_party/mindspore/mindspore/lite/src/
Dscheduler.cc842 auto *origin_tensor = restored_origin_tensor.first; in RestoreTensorData() local
844 MS_ASSERT(origin_tensor != nullptr); in RestoreTensorData()
846 origin_tensor->FreeData(); in RestoreTensorData()
847 origin_tensor->set_data_type(restored_tensor->data_type()); in RestoreTensorData()
848 origin_tensor->set_data(restored_tensor->data()); in RestoreTensorData()
849 origin_tensor->set_own_data(restored_tensor->own_data()); in RestoreTensorData()