Home
last modified time | relevance | path

Searched refs:lite_tensor (Results 1 – 10 of 10) sorted by relevance

/third_party/mindspore/mindspore/lite/src/cxx_api/tensor/
Dtensor_impl.cc45 …auto lite_tensor = lite::Tensor::CreateTensor(name, static_cast<enum TypeId>(type), truncated_shap… in CreateTensorImpl() local
46 if (lite_tensor == nullptr) { in CreateTensorImpl()
50 auto impl = std::shared_ptr<MSTensor::Impl>(new (std::nothrow) Impl(lite_tensor)); in CreateTensorImpl()
62 auto lite_tensor = new (std::nothrow) lite::Tensor(); in StringsToTensorImpl() local
63 if (lite_tensor == nullptr) { in StringsToTensorImpl()
67 lite_tensor->set_tensor_name(name); in StringsToTensorImpl()
68 auto ret = lite::StringsToMSTensor(str, lite_tensor); in StringsToTensorImpl()
71 delete lite_tensor; in StringsToTensorImpl()
74 auto impl = std::shared_ptr<MSTensor::Impl>(new (std::nothrow) Impl(lite_tensor)); in StringsToTensorImpl()
76 delete lite_tensor; in StringsToTensorImpl()
[all …]
Dtensor_impl.h244 tensor::MSTensor *lite_tensor() const { return lite_tensor_; } in lite_tensor() function
/third_party/mindspore/mindspore/lite/src/c_api/
Dtensor_c.cc32 auto lite_tensor = in OH_AI_TensorCreate() local
34 auto impl = new (std::nothrow) mindspore::MSTensor::Impl(lite_tensor); in OH_AI_TensorCreate()
35 if (impl == nullptr || impl->lite_tensor() == nullptr) { in OH_AI_TensorCreate()
57 auto lite_tensor = static_cast<mindspore::lite::Tensor *>(impl->lite_tensor()); in OH_AI_TensorClone() local
58 auto clone = mindspore::lite::Tensor::CopyTensor(*lite_tensor, true, lite_tensor->allocator()); in OH_AI_TensorClone()
Dmodel_c.cc103 if (input == nullptr || input->lite_tensor() == nullptr) { in Resize()
107 inner_input.push_back(input->lite_tensor()); in Resize()
247 if (impl == nullptr || impl->lite_tensor() == nullptr) { in TensorToTensorImpl()
/third_party/mindspore/mindspore/lite/tools/converter/legacy_optimizer/graph/
Dinfershape_pass.cc81 std::unique_ptr<Tensor> lite_tensor = nullptr; in ConvertTensorList() local
110 lite_tensor = std::make_unique<TensorList>(tensor_shape, element_shape); in ConvertTensorList()
111 if (lite_tensor == nullptr) { in ConvertTensorList()
117 auto lite_tensor_list = reinterpret_cast<TensorList *>(lite_tensor.get()); in ConvertTensorList()
120 MS_LOG(INFO) << "tensor_shape is -1, tensor name: " << lite_tensor->tensor_name(); in ConvertTensorList()
132 lite_tensors->emplace_back(lite_tensor.release()); in ConvertTensorList()
136 std::unique_ptr<Tensor> lite_tensor = nullptr; in ConvertString() local
139 lite_tensor = std::make_unique<Tensor>( in ConvertString()
142 if (lite_tensor == nullptr) { in ConvertString()
150 lite_tensors->emplace_back(lite_tensor.release()); in ConvertString()
[all …]
/third_party/mindspore/mindspore/lite/src/cxx_api/model/
Dmodel_impl.cc295 if (impl == nullptr || impl->lite_tensor() == nullptr) { in GetInputs()
333 if (impl == nullptr || impl->lite_tensor() == nullptr) { in GetOutputs()
375 if (gradient.impl_ == nullptr || gradient.impl_->lite_tensor() == nullptr) { in ApplyGradients()
379 inner_gradients[i] = gradient.impl_->lite_tensor(); in ApplyGradients()
413 if (param.impl_ == nullptr || param.impl_->lite_tensor() == nullptr) { in SetOptimizerParams()
417 inner_params[i] = param.impl_->lite_tensor(); in SetOptimizerParams()
434 if (impl == nullptr || impl->lite_tensor() == nullptr) { in GetInputByTensorName()
462 if (impl == nullptr || impl->lite_tensor() == nullptr) { in GetOutputByTensorName()
485 if (impl == nullptr || impl->lite_tensor() == nullptr) { in GetOutputsByNodeName()
531 if (input.impl_ == nullptr || input.impl_->lite_tensor() == nullptr) { in Resize()
[all …]
/third_party/mindspore/mindspore/lite/src/train/
Dtrain_session.cc444 auto lite_tensor = static_cast<lite::Tensor *>(ms_tensor); in RunGraph() local
445 this->outputs_.push_back(lite_tensor); in RunGraph()
497 lite::Tensor *lite_tensor = static_cast<lite::Tensor *>(ms_tensor); in Train() local
498 lite_tensor->set_init_ref_count(lite_tensor->init_ref_count() + 1); in Train()
529 lite::Tensor *lite_tensor = static_cast<lite::Tensor *>(ms_tensor); in Eval() local
530 lite_tensor->set_init_ref_count(lite_tensor->init_ref_count() + 1); in Eval()
/third_party/mindspore/mindspore/lite/src/cxx_api/
Dtensor_utils.cc51 if (impl == nullptr || impl->lite_tensor() == nullptr) { in LiteTensorToMSTensor()
Dtypes.cc87 return impl_ == nullptr ? false : impl_->lite_tensor() == tensor.impl_->lite_tensor(); in operator ==()
/third_party/mindspore/mindspore/lite/src/
Dlite_kernel.h280 …indspore::MSTensor &tensor) { return static_cast<lite::Tensor *>(tensor.impl()->lite_tensor()); }); in in_tensors()
295 …indspore::MSTensor &tensor) { return static_cast<lite::Tensor *>(tensor.impl()->lite_tensor()); }); in out_tensors()