| /test/xts/acts/ai/nncore/nncoretest/src/ |
| D | HdiTensorTest.cpp | 57 NN_Tensor* tensor = OH_NNTensor_Create(deviceId, nullptr); variable 58 ASSERT_EQ(nullptr, tensor); 71 NN_Tensor* tensor = OH_NNTensor_Create(deviceId, tensorDesc); variable 72 ASSERT_NE(nullptr, tensor); 73 ASSERT_EQ(OH_NN_SUCCESS, OH_NNTensor_Destroy(&tensor)); 88 NN_Tensor* tensor = OH_NNTensor_Create(deviceId, tensorDesc); variable 89 ASSERT_NE(nullptr, tensor); 90 ASSERT_EQ(OH_NN_SUCCESS, OH_NNTensor_Destroy(&tensor)); 104 NN_Tensor* tensor = OH_NNTensor_CreateWithSize(deviceId, nullptr, size); variable 105 ASSERT_EQ(nullptr, tensor); [all …]
|
| /test/xts/acts/ai/mindspore/mindsporendktest/entry/src/main/cpp/ |
| D | mindspore.cpp | 1089 OH_AI_TensorHandle tensor = in OHAITensorCreateOne() local 1091 napi_create_int32(env, tensor != nullptr, &result); in OHAITensorCreateOne() 1101 OH_AI_TensorHandle tensor = in OHAITensorDestroyOne() local 1103 NAPI_ASSERT(env, tensor != nullptr, "tensor Create Error"); in OHAITensorDestroyOne() 1104 OH_AI_TensorDestroy(&tensor); in OHAITensorDestroyOne() 1105 napi_create_int32(env, tensor == nullptr, &result); in OHAITensorDestroyOne() 1117 …OH_AI_TensorHandle tensor = OH_AI_TensorCreate("data", OH_AI_DATATYPE_NUMBERTYPE_FLOAT32, createSh… in OHAITensorCloneOne() local 1119 NAPI_ASSERT(env, tensor != nullptr, "tensor Create Error"); in OHAITensorCloneOne() 1120 OH_AI_TensorHandle clone = OH_AI_TensorClone(tensor); in OHAITensorCloneOne() 1122 OH_AI_TensorDestroy(&tensor); in OHAITensorCloneOne() [all …]
|
| /test/xts/acts/ai/mindspore/mindsporectest/src/ |
| D | ohos_c_api_test_mslite.cpp | 232 OH_AI_TensorHandle tensor = inputs.handle_list[i]; in FillInputsData() local 233 int64_t element_num = OH_AI_TensorGetElementNum(tensor); in FillInputsData() 234 printf("Tensor name: %s. \n", OH_AI_TensorGetName(tensor)); in FillInputsData() 240 const int64_t *shape = OH_AI_TensorGetShape(tensor, &shape_num); in FillInputsData() 261 OH_AI_TensorHandle tensor = outputs.handle_list[i]; in CompareResult() local 262 int64_t element_num = OH_AI_TensorGetElementNum(tensor); in CompareResult() 263 printf("Tensor name: %s .\n", OH_AI_TensorGetName(tensor)); in CompareResult() 264 float *output_data = reinterpret_cast<float *>(OH_AI_TensorGetMutableData(tensor)); in CompareResult() 426 …OH_AI_TensorHandle tensor = OH_AI_TensorCreate("fc3.bias", OH_AI_DATATYPE_NUMBERTYPE_FLOAT32, crea… variable 427 ASSERT_NE(tensor, nullptr); [all …]
|
| /test/xts/acts/ai/nncore/common/ |
| D | nncore_utils.cpp | 596 NN_Tensor* tensor = nullptr; in GetExecutorInputOutputTensorByDesc() local 598 tensor = nullptr; in GetExecutorInputOutputTensorByDesc() 599 tensor = OH_NNTensor_Create(deviceID, inputTensorDescs[i]); in GetExecutorInputOutputTensorByDesc() 600 ASSERT_NE(nullptr, tensor); in GetExecutorInputOutputTensorByDesc() 601 inputTensors.emplace_back(tensor); in GetExecutorInputOutputTensorByDesc() 605 tensor = nullptr; in GetExecutorInputOutputTensorByDesc() 606 tensor = OH_NNTensor_Create(deviceID, outputTensorDescs[i]); in GetExecutorInputOutputTensorByDesc() 607 ASSERT_NE(nullptr, tensor); in GetExecutorInputOutputTensorByDesc() 608 outputTensors.emplace_back(tensor); in GetExecutorInputOutputTensorByDesc() 639 NN_Tensor* tensor = nullptr; in GetExecutorInputOutputTensor() local [all …]
|
| /test/xts/hats/ai/nnrt/hdi/v2_0/common/ |
| D | hdi_nnrt_test_utils.cpp | 151 V2_0::IOTensor tensor{.name = "tensor", in CreateIOTensor() local 156 return tensor; in CreateIOTensor() 179 V2_0::IOTensor tensor{.name = "tensor", in CreateInputIOTensor() local 184 return tensor; in CreateInputIOTensor() 200 V2_0::IOTensor tensor{.name = "tensor", in CreateOutputIOTensor() local 205 return tensor; in CreateOutputIOTensor() 247 for (auto &tensor : tensors) { in ReleaseBufferOfTensors() local 248 auto ret = device->ReleaseBuffer(tensor.data); in ReleaseBufferOfTensors() 250 …"[NNRtTest] [ReleaseBufferOfTensors] release buffer failed, fd:%d ret:%d.\n", tensor.data.fd, ret); in ReleaseBufferOfTensors()
|
| /test/xts/hats/ai/nnrt/hdi/v1_0/common/ |
| D | hdi_nnrt_test_utils.cpp | 151 V1_0::IOTensor tensor{.name = "tensor", in CreateIOTensor() local 156 return tensor; in CreateIOTensor() 179 V1_0::IOTensor tensor{.name = "tensor", in CreateInputIOTensor() local 184 return tensor; in CreateInputIOTensor() 200 V1_0::IOTensor tensor{.name = "tensor", in CreateOutputIOTensor() local 205 return tensor; in CreateOutputIOTensor() 247 for (auto &tensor : tensors) { in ReleaseBufferOfTensors() local 248 auto ret = device->ReleaseBuffer(tensor.data); in ReleaseBufferOfTensors() 250 …"[NNRtTest] [ReleaseBufferOfTensors] release buffer failed, fd:%d ret:%d.\n", tensor.data.fd, ret); in ReleaseBufferOfTensors()
|
| /test/xts/hats/ai/nnrt/hdi/v2_0/nnrtFunctionTest/src/ |
| D | hdi_model_run_test.cpp | 66 auto tensor = HDICommon::CreateIOTensor(device_); in AddModelTest() local 67 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); in AddModelTest() 71 inputs.emplace_back(tensor); in AddModelTest() 219 auto tensor = HDICommon::CreateIOTensor(device_); variable 220 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 224 inputs.emplace_back(tensor); 390 auto tensor = HDICommon::CreateIOTensor(device_); variable 391 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 395 inputs.emplace_back(tensor);
|
| D | hdi_model_prepare_test.cpp | 668 auto tensor = HDICommon::CreateIOTensor(device_); variable 669 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 673 inputs.emplace_back(tensor);
|
| /test/xts/hats/ai/nnrt/hdi/v1_0/nnrtFunctionTest/src/ |
| D | hdi_model_run_test.cpp | 67 auto tensor = HDICommon::CreateIOTensor(device_); in AddModelTest() local 68 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); in AddModelTest() 72 inputs.emplace_back(tensor); in AddModelTest() 221 auto tensor = HDICommon::CreateIOTensor(device_); variable 222 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 226 inputs.emplace_back(tensor); 390 auto tensor = HDICommon::CreateIOTensor(device_); variable 391 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 395 inputs.emplace_back(tensor);
|
| /test/xts/hats/ai/nnrt/hdi/v2_0/nnrtFunctionTest_additional/src/ |
| D | hdi_device_test.cpp | 1873 for (auto &tensor : iModel->allTensors) { variable 1874 tensor.dataType = static_cast<V2_0::DataType>(mindspore::lite::DATA_TYPE_UNKNOWN); 1904 for (auto &tensor : iModel->allTensors) { variable 1905 tensor.dataType = static_cast<V2_0::DataType>(mindspore::lite::DATA_TYPE_BOOL); 1935 for (auto &tensor : iModel->allTensors) { variable 1936 tensor.dataType = static_cast<V2_0::DataType>(mindspore::lite::DATA_TYPE_INT8); 1966 for (auto &tensor : iModel->allTensors) { variable 1967 tensor.dataType = static_cast<V2_0::DataType>(mindspore::lite::DATA_TYPE_INT16); 1997 for (auto &tensor : iModel->allTensors) { variable 1998 tensor.dataType = static_cast<V2_0::DataType>(mindspore::lite::DATA_TYPE_INT32); [all …]
|
| D | hdi_model_prepare_test.cpp | 420 auto tensor = HDICommon::CreateIOTensor(device_); variable 421 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 424 inputs.emplace_back(tensor); 484 auto tensor = HDICommon::CreateIOTensor(device_); variable 485 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 488 inputs.emplace_back(tensor); 548 auto tensor = HDICommon::CreateIOTensor(device_); variable 549 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); 552 inputs.emplace_back(tensor); 612 auto tensor = HDICommon::CreateIOTensor(device_); variable [all …]
|
| /test/xts/hats/ai/nnrt/hdi/v1_0/nnrtStabilityTest/src/ |
| D | hdi_stability_test.cpp | 70 auto tensor = HDICommon::CreateIOTensor(device); in RunModelTest() local 71 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); in RunModelTest() 75 inputs.emplace_back(tensor); in RunModelTest()
|
| /test/xts/acts/ai/nncore/e2etest/src/ |
| D | EndToEndTest.cpp | 242 NN_Tensor* tensor = nullptr; in CreateTensorAndDestroyTensorDesc() local 244 tensor = nullptr; in CreateTensorAndDestroyTensorDesc() 245 tensor = OH_NNTensor_Create(deviceId, tensorDescs[i]); in CreateTensorAndDestroyTensorDesc() 246 if (tensor == nullptr) { in CreateTensorAndDestroyTensorDesc() 250 tensors[i] = tensor; in CreateTensorAndDestroyTensorDesc()
|
| /test/xts/hats/ai/nnrt/hdi/v2_0/nnrtStabilityTest/src/ |
| D | hdi_stability_test.cpp | 70 auto tensor = HDICommon::CreateIOTensor(device); in RunModelTest() local 71 auto memAddress = HDICommon::MapMemory(tensor.data.fd, ADDEND_BUFFER_LENGTH); in RunModelTest() 75 inputs.emplace_back(tensor); in RunModelTest()
|