Home
last modified time | relevance | path

Searched refs:model (Results 1 – 25 of 224) sorted by relevance

123456789

/test/xts/acts/ai/neural_network_runtime/v2_0/interface/src/
DCompileTest.cpp43 OH_NNModel *model = OH_NNModel_Construct(); in GenCacheFile() local
44 ASSERT_NE(nullptr, model); in GenCacheFile()
45 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs)); in GenCacheFile()
46 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model); in GenCacheFile()
53 Free(model, compilation); in GenCacheFile()
101 OH_NNModel *model = OH_NNModel_Construct(); variable
102 ASSERT_NE(nullptr, model);
103 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
107 Free(model, compilation);
121 OH_NNModel *model = OH_NNModel_Construct(); variable
[all …]
DModelTest.cpp36 void BuildAddTopKGraph(OH_NNModel *model) in BuildAddTopKGraph() argument
40 ASSERT_EQ(OH_NN_SUCCESS, BuildMultiOpGraph(model, graphArgsMulti)); in BuildAddTopKGraph()
43 void BuildModel(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in BuildModel() argument
45 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs)); in BuildModel()
57 OH_NNModel *model = OH_NNModel_Construct(); variable
58 ASSERT_NE(nullptr, model);
105 OH_NNModel *model = OH_NNModel_Construct(); variable
106 ASSERT_NE(nullptr, model);
108 OH_NN_ReturnCode ret = OH_NNModel_AddTensor(model, nullptr);
110 Free(model);
[all …]
DMemoryTest.cpp70 OH_NNModel *model = OH_NNModel_Construct(); variable
71 ASSERT_NE(nullptr, model);
72 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
73 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
80 Free(model, compilation, executor);
90 OH_NNModel *model = OH_NNModel_Construct(); variable
91 ASSERT_NE(nullptr, model);
92 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
93 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
100 Free(model, compilation, executor);
[all …]
DExecutorTest.cpp63 OH_NNModel *model = OH_NNModel_Construct(); variable
64 ASSERT_NE(nullptr, model);
65 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
67 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
79 Free(model, compilation, executor);
89 OH_NNModel *model = OH_NNModel_Construct(); variable
90 ASSERT_NE(nullptr, model);
91 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
93 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
104 Free(model, compilation);
[all …]
/test/xts/acts/ai/neural_network_runtime/v1_0/interface/src/
DCompileTest.cpp43 OH_NNModel *model = OH_NNModel_Construct(); in GenCacheFile() local
44 ASSERT_NE(nullptr, model); in GenCacheFile()
45 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs)); in GenCacheFile()
46 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model); in GenCacheFile()
53 Free(model, compilation); in GenCacheFile()
101 OH_NNModel *model = OH_NNModel_Construct(); variable
102 ASSERT_NE(nullptr, model);
103 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
107 Free(model, compilation);
121 OH_NNModel *model = OH_NNModel_Construct(); variable
[all …]
DModelTest.cpp36 void BuildAddTopKGraph(OH_NNModel *model) in BuildAddTopKGraph() argument
40 ASSERT_EQ(OH_NN_SUCCESS, BuildMultiOpGraph(model, graphArgsMulti)); in BuildAddTopKGraph()
43 void BuildModel(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in BuildModel() argument
45 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs)); in BuildModel()
57 OH_NNModel *model = OH_NNModel_Construct(); variable
58 ASSERT_NE(nullptr, model);
105 OH_NNModel *model = OH_NNModel_Construct(); variable
106 ASSERT_NE(nullptr, model);
108 OH_NN_ReturnCode ret = OH_NNModel_AddTensor(model, nullptr);
110 Free(model);
[all …]
DMemoryTest.cpp70 OH_NNModel *model = OH_NNModel_Construct(); variable
71 ASSERT_NE(nullptr, model);
72 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
73 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
80 Free(model, compilation, executor);
90 OH_NNModel *model = OH_NNModel_Construct(); variable
91 ASSERT_NE(nullptr, model);
92 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
93 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
100 Free(model, compilation, executor);
[all …]
DExecutorTest.cpp63 OH_NNModel *model = OH_NNModel_Construct(); variable
64 ASSERT_NE(nullptr, model);
65 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
67 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
79 Free(model, compilation, executor);
89 OH_NNModel *model = OH_NNModel_Construct(); variable
90 ASSERT_NE(nullptr, model);
91 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs));
93 OH_NNCompilation *compilation = OH_NNCompilation_Construct(model);
104 Free(model, compilation);
[all …]
/test/xts/acts/ai/nncore/nncoretest/src/
DHdiModelTest.cpp34 void BuildAddTopKGraph(OH_NNModel *model) in BuildAddTopKGraph() argument
38 ASSERT_EQ(OH_NN_SUCCESS, BuildMultiOpGraph(model, graphArgsMulti)); in BuildAddTopKGraph()
41 void BuildModel(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in BuildModel() argument
43 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(model, graphArgs)); in BuildModel()
98 OH_NNModel *model = OH_NNModel_Construct(); variable
99 ASSERT_NE(nullptr, model);
102 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensorToModel(model, tensorDesc));
110 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_SetTensorQuantParams(model, 0, quantParam));
112 OH_NNModel_Destroy(&model);
122 OH_NNModel *model = OH_NNModel_Construct(); variable
[all …]
/test/xts/acts/ai/mindspore/mindsporectest/src/
Dohos_c_api_test_mslite.cpp278 void ModelPredict(OH_AI_ModelHandle model, OH_AI_ContextHandle context, string model_name, in ModelPredict() argument
289 ret = OH_AI_ModelBuild(model, graphBuf, size, OH_AI_MODELTYPE_MINDIR, context); in ModelPredict()
293 ret = OH_AI_ModelBuildFromFile(model, graphPath, OH_AI_MODELTYPE_MINDIR, context); in ModelPredict()
298 OH_AI_TensorHandleArray inputs = OH_AI_ModelGetInputs(model); in ModelPredict()
302 OH_AI_Status resize_ret = OH_AI_ModelResize(model, inputs, &shape_infos, inputs.handle_num); in ModelPredict()
314 … predict_ret = OH_AI_ModelPredict(model, inputs, &outputs, before_call_back, after_call_back); in ModelPredict()
317 predict_ret = OH_AI_ModelPredict(model, inputs, &outputs, nullptr, nullptr); in ModelPredict()
324 OH_AI_ModelDestroy(&model); in ModelPredict()
329 void ModelTrain(OH_AI_ModelHandle model, OH_AI_ContextHandle context, string model_name, in ModelTrain() argument
341 … ret = OH_AI_TrainModelBuild(model, graphBuf, size, OH_AI_MODELTYPE_MINDIR, context, train_cfg); in ModelTrain()
[all …]
/test/xts/hats/ai/nnrt/hdi/v2_0/nnrtFunctionTest_additional/src/
Dhdi_device_test.cpp284 OH_NNModel *model = nullptr; variable
285 HDICommon::BuildAddGraph(&model);
286 ASSERT_NE(model, nullptr);
290 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
315 OH_NNModel *model = nullptr; variable
316 HDICommon::BuildAddGraph(&model);
317 ASSERT_NE(model, nullptr);
321 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
346 OH_NNModel *model = nullptr; variable
347 HDICommon::BuildAddGraph(&model);
[all …]
Dhdi_model_prepare_test.cpp389 OH_NNModel *model = nullptr; variable
390 HDICommon::BuildAddGraph(&model);
391 ASSERT_NE(model, nullptr);
395 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
453 OH_NNModel *model = nullptr; variable
454 HDICommon::BuildAddGraph(&model);
455 ASSERT_NE(model, nullptr);
459 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
517 OH_NNModel *model = nullptr; variable
518 HDICommon::BuildAddGraph(&model);
[all …]
/test/xts/hats/ai/nnrt/hdi/v1_0/nnrtFunctionTest/src/
Dhdi_model_prepare_test.cpp53 OH_NNModel *model = nullptr; variable
54 HDICommon::BuildAddGraph(&model);
55 ASSERT_NE(model, nullptr);
59 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
115 OH_NNModel *model = nullptr; variable
116 HDICommon::BuildAddGraph(&model);
117 ASSERT_NE(model, nullptr);
121 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
159 OH_NNModel *model = nullptr; variable
160 HDICommon::BuildAddGraph(&model);
[all …]
Dhdi_device_test.cpp166 OH_NNModel *model = nullptr; variable
167 HDICommon::BuildAddGraph(&model);
168 ASSERT_NE(model, nullptr);
172 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
193 OH_NNModel *model = nullptr; variable
194 HDICommon::BuildAddGraph(&model);
195 ASSERT_NE(model, nullptr);
199 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
225 OH_NNModel *model = nullptr; variable
226 HDICommon::BuildAddGraph(&model);
[all …]
Dhdi_model_run_test.cpp41 OH_NNModel *model = nullptr; in AddModelTest() local
43 HDICommon::BuildAddGraphDynamic(&model); in AddModelTest()
45 HDICommon::BuildAddGraph(&model); in AddModelTest()
47 ASSERT_NE(model, nullptr); in AddModelTest()
51 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel)); in AddModelTest()
157 OH_NNModel *model = nullptr; variable
158 HDICommon::BuildAddGraph(&model);
159 ASSERT_NE(model, nullptr);
163 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
196 OH_NNModel *model = nullptr; variable
[all …]
/test/xts/acts/ai/nncore/e2etest/src/
DEndToEndTest.cpp38 void BuildModel(OH_NNModel **model) in BuildModel() argument
40 *model = OH_NNModel_Construct(); in BuildModel()
41 ASSERT_NE(nullptr, model); in BuildModel()
44 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(*model, graphArgs)); in BuildModel()
47 void BuildDynamicModel(OH_NNModel **model) in BuildDynamicModel() argument
49 *model = OH_NNModel_Construct(); in BuildDynamicModel()
50 ASSERT_NE(nullptr, model); in BuildDynamicModel()
53 ASSERT_EQ(OH_NN_SUCCESS, BuildSingleOpGraph(*model, graphArgs)); in BuildDynamicModel()
56 void BuildModelWithQuantParams(OH_NNModel **model) in BuildModelWithQuantParams() argument
58 *model = OH_NNModel_Construct(); in BuildModelWithQuantParams()
[all …]
/test/xts/hats/ai/nnrt/hdi/v2_0/nnrtFunctionTest/src/
Dhdi_model_prepare_test.cpp53 OH_NNModel *model = nullptr; variable
54 HDICommon::BuildAddGraph(&model);
55 ASSERT_NE(model, nullptr);
59 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
117 OH_NNModel *model = nullptr; variable
118 HDICommon::BuildAddGraph(&model);
119 ASSERT_NE(model, nullptr);
123 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
163 OH_NNModel *model = nullptr; variable
164 HDICommon::BuildAddGraph(&model);
[all …]
Dhdi_device_test.cpp166 OH_NNModel *model = nullptr; variable
167 HDICommon::BuildAddGraph(&model);
168 ASSERT_NE(model, nullptr);
172 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
193 OH_NNModel *model = nullptr; variable
194 HDICommon::BuildAddGraph(&model);
195 ASSERT_NE(model, nullptr);
199 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
225 OH_NNModel *model = nullptr; variable
226 HDICommon::BuildAddGraph(&model);
[all …]
Dhdi_model_run_test.cpp41 OH_NNModel *model = nullptr; in AddModelTest() local
43 HDICommon::BuildAddGraphDynamic(&model); in AddModelTest()
45 HDICommon::BuildAddGraph(&model); in AddModelTest()
47 ASSERT_NE(model, nullptr); in AddModelTest()
51 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel)); in AddModelTest()
156 OH_NNModel *model = nullptr; variable
157 HDICommon::BuildAddGraph(&model);
158 ASSERT_NE(model, nullptr);
162 ASSERT_EQ(OH_NN_SUCCESS, HDICommon::ConvertModel(device_, model, tensorBuffer, &iModel));
195 OH_NNModel *model = nullptr; variable
[all …]
/test/xts/hats/ai/nnrt/hdi/v2_0/common/
Dhdi_nnrt_test_utils.cpp28 void HDICommon::BuildAddGraph(OH_NNModel **model) in BuildAddGraph() argument
32 *model = OH_NNModel_Construct(); in BuildAddGraph()
33 ASSERT_NE(nullptr, model); in BuildAddGraph()
40 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &firstAddend)); in BuildAddGraph()
41 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &secondAddend)); in BuildAddGraph()
48 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &activationType)); in BuildAddGraph()
50 …ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_SetTensorData(*model, opCnt, (void *)&activationValue, sizeof(… in BuildAddGraph()
56 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &output)); in BuildAddGraph()
60 … OH_NNModel_AddOperation(*model, OH_NN_OPS_ADD, &paramIndices, &inputIndices, &outputIndices)); in BuildAddGraph()
61 …ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_SpecifyInputsAndOutputs(*model, &inputIndices, &outputIndices)… in BuildAddGraph()
[all …]
/test/xts/hats/ai/nnrt/hdi/v1_0/common/
Dhdi_nnrt_test_utils.cpp28 void HDICommon::BuildAddGraph(OH_NNModel **model) in BuildAddGraph() argument
32 *model = OH_NNModel_Construct(); in BuildAddGraph()
33 ASSERT_NE(nullptr, model); in BuildAddGraph()
40 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &firstAddend)); in BuildAddGraph()
41 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &secondAddend)); in BuildAddGraph()
48 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &activationType)); in BuildAddGraph()
50 …ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_SetTensorData(*model, opCnt, (void *)&activationValue, sizeof(… in BuildAddGraph()
56 ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_AddTensor(*model, &output)); in BuildAddGraph()
60 … OH_NNModel_AddOperation(*model, OH_NN_OPS_ADD, &paramIndices, &inputIndices, &outputIndices)); in BuildAddGraph()
61 …ASSERT_EQ(OH_NN_SUCCESS, OH_NNModel_SpecifyInputsAndOutputs(*model, &inputIndices, &outputIndices)… in BuildAddGraph()
[all …]
/test/xts/acts/ai/nncore/common/
Dnncore_utils.cpp60 int MultiModelBuildEndStep(OH_NNModel *model, const OHNNGraphArgsMulti &graphArgs) in MultiModelBuildEndStep() argument
65 ret = OH_NNModel_SpecifyInputsAndOutputs(model, &graphInputs, &graphOutputs); in MultiModelBuildEndStep()
70 ret = OH_NNModel_Finish(model); in MultiModelBuildEndStep()
78 int BuildMultiOpGraph(OH_NNModel *model, const OHNNGraphArgsMulti &graphArgs) in BuildMultiOpGraph() argument
88 ret = OH_NNModel_AddTensorToModel(model, tensorDesc); in BuildMultiOpGraph()
93 ret = OH_NNModel_SetTensorType(model, i, operandTem.type); in BuildMultiOpGraph()
100 ret = OH_NNModel_SetTensorData(model, opCnt, operandTem.data, operandTem.length); in BuildMultiOpGraph()
111 … ret = OH_NNModel_AddOperation(model, graphArgs.operationTypes[j], &paramIndices, &inputIndices, in BuildMultiOpGraph()
118 ret = MultiModelBuildEndStep(model, graphArgs); in BuildMultiOpGraph()
122 int SingleModelBuildEndStep(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in SingleModelBuildEndStep() argument
[all …]
/test/xts/device_attest_lite/services/core/attest/
Dattest_service_device.c215 char *model = AttestGetProductModel(); in GetUdidDecrypted() local
216 if (model == NULL) { in GetUdidDecrypted()
223 ATTEST_MEM_FREE(model); in GetUdidDecrypted()
227 int32_t modelLen = strlen(model); in GetUdidDecrypted()
233 (strlen(model) > MAX_ATTEST_MODEL_LEN) || \ in GetUdidDecrypted()
245 (memcpy_s(udid + enShortNameLen, udidSize, model, modelLen) != 0) || \ in GetUdidDecrypted()
254 ATTEST_MEM_FREE(model); in GetUdidDecrypted()
/test/xts/acts/ai/neural_network_runtime/v1_0/common/
Dnnrt_utils.cpp29 int BuildMultiOpGraph(OH_NNModel *model, const OHNNGraphArgsMulti &graphArgs) in BuildMultiOpGraph() argument
39 ret = OH_NNModel_AddTensor(model, &operand); in BuildMultiOpGraph()
46 ret = OH_NNModel_SetTensorData(model, opCnt, operandTem.data, operandTem.length); in BuildMultiOpGraph()
58 … ret = OH_NNModel_AddOperation(model, graphArgs.operationTypes[j], &paramIndices, &inputIndices, in BuildMultiOpGraph()
67 ret = OH_NNModel_SpecifyInputsAndOutputs(model, &graphInputs, &graphOutputs); in BuildMultiOpGraph()
72 ret = OH_NNModel_Finish(model); in BuildMultiOpGraph()
80 int BuildSingleOpGraph(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in BuildSingleOpGraph() argument
88 ret = OH_NNModel_AddTensor(model, &operand); in BuildSingleOpGraph()
96 ret = OH_NNModel_SetTensorData(model, i, operandTem.data, operandTem.length); in BuildSingleOpGraph()
107 ret = OH_NNModel_AddOperation(model, graphArgs.operationType, &paramIndices, &inputIndices, in BuildSingleOpGraph()
[all …]
/test/xts/acts/ai/neural_network_runtime/v2_0/common/
Dnnrt_utils.cpp29 int BuildMultiOpGraph(OH_NNModel *model, const OHNNGraphArgsMulti &graphArgs) in BuildMultiOpGraph() argument
39 ret = OH_NNModel_AddTensor(model, &operand); in BuildMultiOpGraph()
46 ret = OH_NNModel_SetTensorData(model, opCnt, operandTem.data, operandTem.length); in BuildMultiOpGraph()
58 … ret = OH_NNModel_AddOperation(model, graphArgs.operationTypes[j], &paramIndices, &inputIndices, in BuildMultiOpGraph()
67 ret = OH_NNModel_SpecifyInputsAndOutputs(model, &graphInputs, &graphOutputs); in BuildMultiOpGraph()
72 ret = OH_NNModel_Finish(model); in BuildMultiOpGraph()
80 int BuildSingleOpGraph(OH_NNModel *model, const OHNNGraphArgs &graphArgs) in BuildSingleOpGraph() argument
88 ret = OH_NNModel_AddTensor(model, &operand); in BuildSingleOpGraph()
96 ret = OH_NNModel_SetTensorData(model, i, operandTem.data, operandTem.length); in BuildSingleOpGraph()
107 ret = OH_NNModel_AddOperation(model, graphArgs.operationType, &paramIndices, &inputIndices, in BuildSingleOpGraph()
[all …]

123456789