Home
last modified time | relevance | path

Searched refs:ge_tensor (Results 1 – 9 of 9) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/
Dutil.cc344 MeTensorPtr TransformUtil::GenerateMeTensor(const GeTensorPtr &ge_tensor, const ShapeVector &me_dim… in GenerateMeTensor() argument
352 MS_EXCEPTION_IF_NULL(ge_tensor); in GenerateMeTensor()
353 if (me_data_size < ge_tensor->GetSize()) { in GenerateMeTensor()
355 << ge_tensor->GetSize() << " bytes]"; in GenerateMeTensor()
360 MS_EXCEPTION_IF_NULL(ge_tensor->GetData()); in GenerateMeTensor()
361 if (ge_tensor->GetSize() == 0) { in GenerateMeTensor()
368 memcpy(me_data_ptr, ge_tensor->GetData(), ge_tensor->GetSize()); in GenerateMeTensor()
373 MeTensorPtr TransformUtil::ConvertGeTensor(const GeTensorPtr &ge_tensor) { in ConvertGeTensor() argument
374 MS_EXCEPTION_IF_NULL(ge_tensor); in ConvertGeTensor()
375 GeShape ge_shape = ge_tensor->GetTensorDesc().GetShape(); in ConvertGeTensor()
[all …]
Dutil.h114 static MeTensorPtr ConvertGeTensor(GeTensorPtr ge_tensor, const ShapeVector &request_dims);
139 …static MeTensorPtr GenerateMeTensor(const GeTensorPtr &ge_tensor, const ShapeVector &me_dims, cons…
214 static std::string PrintGeTensor(const GeTensorPtr ge_tensor);
Dgraph_runner.cc162 … [](const GeTensor &ge_tensor) { return std::make_shared<GeTensor>(ge_tensor); }); in RunGraph() argument
Dop_adapter_util.cc34 auto ge_tensor = TransformUtil::ConvertTensor(me_tensor, kOpFormat_ND); in ConvertAnyUtil() local
35 return ge_tensor == nullptr ? GeTensor() : *ge_tensor; in ConvertAnyUtil()
Dconvert.cc1851 …GeTensorPtr ge_tensor = transform::TransformUtil::ConvertTensor(vec[i]->cast<MeTensorPtr>(), kOpFo… in TryConvertValueNodeToMultiConst() local
1853 (void)const_op->set_attr_value(*ge_tensor); in TryConvertValueNodeToMultiConst()
1854 (void)const_op->update_output_desc_y(ge_tensor->GetTensorDesc()); in TryConvertValueNodeToMultiConst()
1897 auto ge_tensor = const_op->get_attr_value(); in ConvertValueNode() local
1898 auto ge_desc = ge_tensor.GetTensorDesc(); in ConvertValueNode()
/third_party/mindspore/mindspore/lite/src/delegate/npu/
Dnpu_converter_utils.cc126 std::shared_ptr<ge::Tensor> ge_tensor = std::make_shared<ge::Tensor>(); in ConverterToNPUTensor() local
127 if (ge_tensor == nullptr) { in ConverterToNPUTensor()
133 ge_tensor->SetTensorDesc(tensor_desc); in ConverterToNPUTensor()
141ge_tensor->SetData(reinterpret_cast<const uint8_t *>(fp32_data), src.ElementNum() * sizeof(float)); in ConverterToNPUTensor()
149 ge_tensor->SetData(reinterpret_cast<const uint8_t *>(src.MutableData()), src.DataSize()); in ConverterToNPUTensor()
152 return ge_tensor; in ConverterToNPUTensor()
/third_party/mindspore/mindspore/lite/src/delegate/npu/op/
Dargmax_npu.cc41 std::shared_ptr<ge::Tensor> ge_tensor = in Init() local
43 if (ge_tensor == nullptr) { in Init()
47 axis_const_->set_attr_value(ge_tensor); in Init()
/third_party/mindspore/tests/ut/cpp/transform/
Dconvert_test.cc706 GeTensor& ge_tensor = *ge_tensor_ptr; in TEST_F() local
707 const DTYPE* ge_data = reinterpret_cast<DTYPE*>(ge_tensor.GetData()); in TEST_F()
710 assert(ge_data == reinterpret_cast<DTYPE*>(ge_tensor.GetData())); in TEST_F()
712 cout << "ge data size is: " << std::dec << ge_tensor.GetSize() << " bytes" << endl; in TEST_F()
713 for (int i = 0; i < ge_tensor.GetSize() / sizeof(DTYPE); i++) { in TEST_F()
723 assert(ge_tensor.GetSize() == me_tensor.data().nbytes()); in TEST_F()
724 assert(memcmp(ge_data, me_data, ge_tensor.GetSize()) == 0); in TEST_F()
/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/executor/tiling/
Dop_tiling_adapter.cc174 ge::GeTensorPtr ge_tensor = std::make_shared<ge::GeTensor>( in NewConstantOp() local
178 ge::OpDescUtils::SetWeights(constant_op, {ge_tensor}); in NewConstantOp()
179 (void)ge::AttrUtils::SetTensor(op_desc, ATTR_NAME_WEIGHTS, ge_tensor); in NewConstantOp()