Home
last modified time | relevance | path

Searched refs:tensorDesc (Results 1 – 25 of 30) sorted by relevance

12

/ohos5.0/foundation/ai/neural_network_runtime/interfaces/kits/c/neural_network_runtime/
H A Dneural_network_core.h401 OH_NN_ReturnCode OH_NNTensorDesc_Destroy(NN_TensorDesc **tensorDesc);
419 OH_NN_ReturnCode OH_NNTensorDesc_SetName(NN_TensorDesc *tensorDesc, const char *name);
441 OH_NN_ReturnCode OH_NNTensorDesc_GetName(const NN_TensorDesc *tensorDesc, const char **name);
458 OH_NN_ReturnCode OH_NNTensorDesc_SetDataType(NN_TensorDesc *tensorDesc, OH_NN_DataType dataType);
475 OH_NN_ReturnCode OH_NNTensorDesc_GetDataType(const NN_TensorDesc *tensorDesc, OH_NN_DataType *dataT…
533 OH_NN_ReturnCode OH_NNTensorDesc_SetFormat(NN_TensorDesc *tensorDesc, OH_NN_Format format);
550 OH_NN_ReturnCode OH_NNTensorDesc_GetFormat(const NN_TensorDesc *tensorDesc, OH_NN_Format *format);
591 OH_NN_ReturnCode OH_NNTensorDesc_GetByteSize(const NN_TensorDesc *tensorDesc, size_t *byteSize);
617 NN_Tensor *OH_NNTensor_Create(size_t deviceID, NN_TensorDesc *tensorDesc);
644 NN_Tensor *OH_NNTensor_CreateWithSize(size_t deviceID, NN_TensorDesc *tensorDesc, size_t size);
[all …]
H A Dneural_network_runtime.h182 OH_NN_ReturnCode OH_NNModel_AddTensorToModel(OH_NNModel *model, const NN_TensorDesc *tensorDesc);
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/nn_tensor/
H A Dnn_tensor_test.cpp190 TensorDesc* tensorDesc = &desc; variable
296 TensorDesc* tensorDesc = &desc; variable
399 TensorDesc* tensorDesc = &desc; variable
464 TensorDesc* tensorDesc = &desc; variable
533 TensorDesc* tensorDesc = &desc; variable
600 TensorDesc* tensorDesc = &desc; variable
629 TensorDesc* tensorDesc = &desc; variable
780 TensorDesc* tensorDesc = &desc; variable
811 TensorDesc* tensorDesc = &desc; variable
842 TensorDesc* tensorDesc = &desc; variable
[all …]
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/neural_network_core_test/
H A Dneural_network_core_test.cpp920 NN_TensorDesc* tensorDesc = nullptr; variable
944 NN_TensorDesc* tensorDesc = nullptr; variable
983 NN_TensorDesc* tensorDesc = nullptr; variable
1022 NN_TensorDesc* tensorDesc = nullptr; variable
1048 NN_TensorDesc* tensorDesc = nullptr; variable
1087 NN_TensorDesc* tensorDesc = nullptr; variable
1143 NN_TensorDesc* tensorDesc = nullptr; variable
1187 NN_TensorDesc* tensorDesc = nullptr; variable
1213 NN_TensorDesc* tensorDesc = nullptr; variable
1252 NN_TensorDesc* tensorDesc = nullptr; variable
[all …]
H A Dneural_network_core_test.h44 TensorDesc* tensorDesc = &desc; variable
/ohos5.0/foundation/ai/neural_network_runtime/
H A Dneural-network-runtime-guidelines.md292 NN_TensorDesc* tensorDesc = OH_NNTensorDesc_Create();
293 CHECKEQ(tensorDesc, nullptr, -1, "Create TensorDesc failed.");
305 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
312 tensorDesc = OH_NNTensorDesc_Create();
313 CHECKEQ(tensorDesc, nullptr, -1, "Create TensorDesc failed.");
324 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
331 tensorDesc = OH_NNTensorDesc_Create();
332 CHECKEQ(tensorDesc, nullptr, -1, "Create TensorDesc failed.");
344 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
356 tensorDesc = OH_NNTensorDesc_Create();
[all …]
/ohos5.0/docs/zh-cn/application-dev/ai/nnrt/
H A Dneural-network-runtime-guidelines.md283 NN_TensorDesc* tensorDesc = OH_NNTensorDesc_Create();
296 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
303 tensorDesc = OH_NNTensorDesc_Create();
306 returnCode = OH_NNTensorDesc_SetShape(tensorDesc, inputDims, 4);
315 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
322 tensorDesc = OH_NNTensorDesc_Create();
329 returnCode = OH_NNTensorDesc_SetDataType(tensorDesc, OH_NN_INT8);
335 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
347 tensorDesc = OH_NNTensorDesc_Create();
350 returnCode = OH_NNTensorDesc_SetShape(tensorDesc, inputDims, 4);
[all …]
/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_core/
H A Dneural_network_core.cpp810 return tensorDesc; in OH_NNTensorDesc_Create()
815 if (tensorDesc == nullptr) { in OH_NNTensorDesc_Destroy()
826 *tensorDesc = nullptr; in OH_NNTensorDesc_Destroy()
832 if (tensorDesc == nullptr) { in OH_NNTensorDesc_SetName()
847 if (tensorDesc == nullptr) { in OH_NNTensorDesc_GetName()
866 if (tensorDesc == nullptr) { in OH_NNTensorDesc_SetDataType()
877 if (tensorDesc == nullptr) { in OH_NNTensorDesc_GetDataType()
892 if (tensorDesc == nullptr) { in OH_NNTensorDesc_SetShape()
912 if (tensorDesc == nullptr) { in OH_NNTensorDesc_GetShape()
935 if (tensorDesc == nullptr) { in OH_NNTensorDesc_SetFormat()
[all …]
H A Dtensor.h30 virtual OH_NN_ReturnCode SetTensorDesc(const TensorDesc* tensorDesc) = 0;
/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/
H A Dnncompiler.cpp46 if (tensorDesc.first == nullptr) { in CopyFromTensorDesc()
56 ret = tensorDesc.first->GetFormat(&m_format); in CopyFromTensorDesc()
68 ret = tensorDesc.first->GetName(&m_name); in CopyFromTensorDesc()
74 m_tensorType = tensorDesc.second; in CopyFromTensorDesc()
87 ret = tensorDesc.SetFormat(m_format); in CopyToTensorDesc()
93 ret = tensorDesc.SetShape(m_shape, m_shapeNum); in CopyToTensorDesc()
99 ret = tensorDesc.SetName(m_name); in CopyToTensorDesc()
785 for (const auto& tensorDesc : tensorDescs) { in SerializeTensorsToBuffer() local
804 totalSize += strlen(tensorDesc.m_name) + 1; in SerializeTensorsToBuffer()
858 memRet = strcpy_s(currentPos, strlen(tensorDesc.m_name) + 1, tensorDesc.m_name); in SerializeTensorsToBuffer()
[all …]
H A Dnnexecutor.cpp122 auto tensorDesc = m_outputTensorDescs[outputIndex].first; in GetOutputShape() local
124 auto ret = tensorDesc->GetShape(shape, &shapeNumTmp); in GetOutputShape()
387 auto ret = tensorDesc.first->GetDataType(&dataType); in CompareAttribute()
399 ret = tensorDesc.first->GetShape(&shape, &shapeNum); in CompareAttribute()
419 if (tensorDesc.second != tensor.GetType()) { in CompareAttribute()
681 const std::pair<std::shared_ptr<TensorDesc>, OH_NN_TensorType>& tensorDesc) in BuildNNTensorFromDesc() argument
690 NN_TensorDesc* tensorDescCast = reinterpret_cast<NN_TensorDesc*>(tensorDesc.first.get()); in BuildNNTensorFromDesc()
698 tensorDesc.first->GetFormat(&format); in BuildNNTensorFromDesc()
705 ret = tensor->SetTensorType(tensorDesc.second); in BuildNNTensorFromDesc()
711 if (!CompareAttribute(tensorDesc, *tensor)) { in BuildNNTensorFromDesc()
[all …]
H A Dnnexecutor.h84 …const std::pair<std::shared_ptr<TensorDesc>, OH_NN_TensorType>& tensorDesc, const NNTensor& tensor…
86 const std::pair<std::shared_ptr<TensorDesc>, OH_NN_TensorType>& tensorDesc);
H A Dnntensor.cpp41 OH_NN_ReturnCode NNTensor2_0::SetTensorDesc(const TensorDesc* tensorDesc) in SetTensorDesc() argument
54 *m_tensorDesc = *tensorDesc; in SetTensorDesc()
H A Dnn_tensor.cpp159 OH_NN_ReturnCode NNTensor::BuildFromTensorDesc(const NN_TensorDesc* tensorDesc) in BuildFromTensorDesc() argument
161 if (tensorDesc == nullptr) { in BuildFromTensorDesc()
166 …auto* tensorDescImpl = reinterpret_cast<const OHOS::NeuralNetworkRuntime::TensorDesc*>(tensorDesc); in BuildFromTensorDesc()
H A Dnntensor.h29 OH_NN_ReturnCode SetTensorDesc(const TensorDesc* tensorDesc) override;
H A Dnn_tensor.h45 OH_NN_ReturnCode BuildFromTensorDesc(const NN_TensorDesc* tensorDesc);
/ohos5.0/docs/zh-cn/application-dev/reference/apis-neural-network-runtime-kit/
H A Dneural__network__core_8h.md43 …estroy) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*\*tensorDesc) | 释放一个[NN_Tenso…
44 …_setname) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const char \*na…
45 …me) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const char \*\*…
48 …setshape) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const int32_t \…
49 …pe) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, int32_t \*\*sha…
50 …etformat) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_Format](…
51 …at) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_Format](…
52 …nt) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, size_t \*elemen…
53 …ze) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, size_t \*byteSi…
54 … deviceID, [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc) | 从[NN_TensorDe…
[all …]
H A D_neural_network_runtime.md2485 **必须提供tensorDesc**,如果它是空指针,则返回错误码。
2519 必须提供**tensorDesc**,如果为空指针,则该接口返回错误码。
2789 如果**tensorDesc**或**\*tensorDesc**为空指针,则该接口将返回错误码,并且不会执行销毁操作。
2820 如果**tensorDesc**或**byteSize**为空指针,则该接口将返回错误码。
2848 如果**tensorDesc**或**dataType**为空指针,则该接口将返回错误码。
2906 如果**tensorDesc**或**format**为空指针,则该接口将返回错误码。
2936 您不需要释放**name**的内存,当**tensorDesc**被销毁时,它会被自动释放。
2966 您不需要释放**shape**的内存。当**tensorDesc**被销毁时,它会自动释放。
2995 如果**tensorDesc**为空指针,则该接口将返回错误码。
3023 如果**tensorDesc**为空指针,则该接口将返回错误码。
[all …]
H A D_neural_nework_runtime.md2485 **必须提供tensorDesc**,如果它是空指针,则返回错误码。
2519 必须提供**tensorDesc**,如果为空指针,则该接口返回错误码。
2789 如果**tensorDesc**或**\*tensorDesc**为空指针,则该接口将返回错误码,并且不会执行销毁操作。
2820 如果**tensorDesc**或**byteSize**为空指针,则该接口将返回错误码。
2848 如果**tensorDesc**或**dataType**为空指针,则该接口将返回错误码。
2906 如果**tensorDesc**或**format**为空指针,则该接口将返回错误码。
2936 您不需要释放**name**的内存,当**tensorDesc**被销毁时,它会被自动释放。
2966 您不需要释放**shape**的内存。当**tensorDesc**被销毁时,它会自动释放。
2995 如果**tensorDesc**为空指针,则该接口将返回错误码。
3023 如果**tensorDesc**为空指针,则该接口将返回错误码。
[all …]
/ohos5.0/docs/en/application-dev/ai/nnrt/
H A Dneural-network-runtime-guidelines.md283 NN_TensorDesc* tensorDesc = OH_NNTensorDesc_Create();
296 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
303 tensorDesc = OH_NNTensorDesc_Create();
306 returnCode = OH_NNTensorDesc_SetShape(tensorDesc, inputDims, 4);
315 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
322 tensorDesc = OH_NNTensorDesc_Create();
329 returnCode = OH_NNTensorDesc_SetDataType(tensorDesc, OH_NN_INT8);
335 returnCode = OH_NNModel_AddTensorToModel(model, tensorDesc);
347 tensorDesc = OH_NNTensorDesc_Create();
350 returnCode = OH_NNTensorDesc_SetShape(tensorDesc, inputDims, 4);
[all …]
/ohos5.0/docs/en/application-dev/reference/apis-neural-network-runtime-kit/
H A Dneural__network__core_8h.md43 …estroy) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*\*tensorDesc) | Releases an […
44 …_setname) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const char \*na…
45 …me) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const char \*\*…
46 …datatype) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_DataType…
47 …pe) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_DataType…
48 …setshape) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, const int32_t \…
49 …pe) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, int32_t \*\*sha…
50 …etformat) ([NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_Format](…
51 …at) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, [OH_NN_Format](…
52 …nt) (const [NN_TensorDesc](_neural_network_runtime.md#nn_tensordesc) \*tensorDesc, size_t \*elemen…
[all …]
H A D_neural_network_runtime.md2496 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2530 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2567 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2780 OH_NN_ReturnCode OH_NNTensorDesc_Destroy (NN_TensorDesc **tensorDesc)
2789 If **tensorDesc** or **\*tensorDesc** is a null pointer, an error code is returned but the object w…
2828 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2856 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2886 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2914 | tensorDesc | Pointer to the [NN_TensorDesc](#nn_tensordesc) instance.|
2995 If **tensorDesc** is a null pointer, an error code is returned.
[all …]
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/hdi_prepared_model/
H A Dhdi_prepared_model_test.cpp744 TensorDesc tensorDesc; variable
746 tensorDesc.SetName(&name);
747 tensorDesc.SetDataType(OH_NN_UINT32);
748 tensorDesc.SetFormat(OH_NN_FORMAT_NCHW);
752 tensorDesc.SetShape(ptr, dimensionCount);
754 OH_NN_ReturnCode retSetTensorDesc = nnTensor->SetTensorDesc(&tensorDesc);
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/v2_0/hdi_prepared_model/
H A Dhdi_prepared_model_test.cpp739 TensorDesc tensorDesc; variable
741 tensorDesc.SetName(&name);
742 tensorDesc.SetDataType(OH_NN_UINT32);
743 tensorDesc.SetFormat(OH_NN_FORMAT_NCHW);
747 tensorDesc.SetShape(ptr, dimensionCount);
749 OH_NN_ReturnCode retSetTensorDesc = nnTensor->SetTensorDesc(&tensorDesc);
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/v2_1/hdi_prepared_model/
H A Dhdi_prepared_model_test.cpp738 TensorDesc tensorDesc; variable
740 tensorDesc.SetName(&name);
741 tensorDesc.SetDataType(OH_NN_UINT32);
742 tensorDesc.SetFormat(OH_NN_FORMAT_NCHW);
746 tensorDesc.SetShape(ptr, dimensionCount);
748 OH_NN_ReturnCode retSetTensorDesc = nnTensor->SetTensorDesc(&tensorDesc);

12