/foundation/ai/neural_network_runtime/test/unittest/common/v2_0/ |
H A D | compilation_mock_idevice.cpp | 165 OH_NN_ReturnCode HDIPreparedModelV2_0::ExportModelCache(std::vector<Buffer>& modelCache) in ExportModelCache() argument 167 if (!modelCache.empty()) { in ExportModelCache() 168 LOGE("HDIPreparedModelV2_0 mock ExportModelCache failed, the modelCache is not empty"); in ExportModelCache() 182 modelCache.emplace_back(buffer); in ExportModelCache() 188 modelCache.emplace_back(buffer2); in ExportModelCache() 225 OH_NN_ReturnCode HDIDeviceV2_0::PrepareModelFromModelCache(const std::vector<Buffer>& modelCache, in PrepareModelFromModelCache() argument 233 if (modelCache.size() == 0 || config.enableFloat16 == false) { in PrepareModelFromModelCache() 234 LOGE("HDIDeviceV2_0 mock PrepareModel failed, the modelCache size equals 0 or enableFloat16 is false"); in PrepareModelFromModelCache()
|
/foundation/ai/neural_network_runtime/test/unittest/common/v1_0/ |
H A D | compilation_mock_idevice.cpp | 165 OH_NN_ReturnCode HDIPreparedModelV1_0::ExportModelCache(std::vector<Buffer>& modelCache) in ExportModelCache() argument 167 if (!modelCache.empty()) { in ExportModelCache() 168 LOGE("HDIPreparedModelV1_0 mock ExportModelCache failed, the modelCache is not empty"); in ExportModelCache() 182 modelCache.emplace_back(buffer); in ExportModelCache() 188 modelCache.emplace_back(buffer2); in ExportModelCache() 225 OH_NN_ReturnCode HDIDeviceV1_0::PrepareModelFromModelCache(const std::vector<Buffer>& modelCache, in PrepareModelFromModelCache() argument 233 if (modelCache.size() == 0 || config.enableFloat16 == false) { in PrepareModelFromModelCache() 234 LOGE("HDIDeviceV1_0 mock PrepareModel failed, the modelCache size equals 0 or enableFloat16 is false"); in PrepareModelFromModelCache()
|
/foundation/ai/neural_network_runtime/test/unittest/components/v2_0/hdi_prepared_model/ |
H A D | hdi_prepared_model_test.cpp | 137 std::vector<Buffer> modelCache; in HWTEST_F() local 147 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 164 std::vector<Buffer> modelCache; in HWTEST_F() local 174 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 190 std::vector<Buffer> modelCache; in HWTEST_F() local 191 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 208 std::vector<Buffer> modelCache; in HWTEST_F() local 218 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 237 std::vector<Buffer> modelCache; in HWTEST_F() local 239 modelCache in HWTEST_F() [all...] |
/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/hdi_prepared_model/ |
H A D | hdi_prepared_model_test.cpp | 139 std::vector<Buffer> modelCache; in HWTEST_F() local 149 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 166 std::vector<Buffer> modelCache; in HWTEST_F() local 176 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 192 std::vector<Buffer> modelCache; in HWTEST_F() local 193 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 210 std::vector<Buffer> modelCache; in HWTEST_F() local 220 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 239 std::vector<Buffer> modelCache; in HWTEST_F() local 241 modelCache in HWTEST_F() [all...] |
/foundation/ai/neural_network_runtime/test/unittest/components/v2_1/hdi_prepared_model/ |
H A D | hdi_prepared_model_test.cpp | 137 std::vector<Buffer> modelCache; in HWTEST_F() local 147 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 164 std::vector<Buffer> modelCache; in HWTEST_F() local 174 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 190 std::vector<Buffer> modelCache; in HWTEST_F() local 191 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 208 std::vector<Buffer> modelCache; in HWTEST_F() local 218 OH_NN_ReturnCode result = preparedModel->ExportModelCache(modelCache); in HWTEST_F() 237 std::vector<Buffer> modelCache; in HWTEST_F() local 239 modelCache in HWTEST_F() [all...] |
/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ |
H A D | hdi_prepared_model_v2_1.cpp | 180 OH_NN_ReturnCode HDIPreparedModelV2_1::ExportModelCache(std::vector<Buffer>& modelCache) in ExportModelCache() argument 182 if (!modelCache.empty()) { in ExportModelCache() 183 LOGE("The vector of modelCache should be empty. size=%{public}zu", modelCache.size()); in ExportModelCache() 203 modelCache.emplace_back(modelbuffer); in ExportModelCache()
|
H A D | hdi_prepared_model_v2_0.cpp | 180 OH_NN_ReturnCode HDIPreparedModelV2_0::ExportModelCache(std::vector<Buffer>& modelCache) in ExportModelCache() argument 182 if (!modelCache.empty()) { in ExportModelCache() 183 LOGE("The vector of modelCache should be empty. size=%{public}zu", modelCache.size()); in ExportModelCache() 203 modelCache.emplace_back(modelbuffer); in ExportModelCache()
|
H A D | hdi_prepared_model_v1_0.cpp | 179 OH_NN_ReturnCode HDIPreparedModelV1_0::ExportModelCache(std::vector<Buffer>& modelCache) in ExportModelCache() argument 181 if (!modelCache.empty()) { in ExportModelCache() 182 LOGE("The vector of modelCache should be empty. size=%zu", modelCache.size()); in ExportModelCache() 203 modelCache.emplace_back(modelbuffer); in ExportModelCache()
|
H A D | prepared_model.h | 31 virtual OH_NN_ReturnCode ExportModelCache(std::vector<Buffer>& modelCache) = 0;
|
H A D | hdi_prepared_model_v1_0.h | 38 OH_NN_ReturnCode ExportModelCache(std::vector<Buffer>& modelCache) override;
|
H A D | hdi_prepared_model_v2_0.h | 39 OH_NN_ReturnCode ExportModelCache(std::vector<Buffer>& modelCache) override;
|
H A D | hdi_prepared_model_v2_1.h | 39 OH_NN_ReturnCode ExportModelCache(std::vector<Buffer>& modelCache) override;
|
H A D | hdi_device_v1_0.cpp | 301 OH_NN_ReturnCode HDIDeviceV1_0::PrepareModelFromModelCache(const std::vector<Buffer>& modelCache, in PrepareModelFromModelCache() argument 308 size_t modelCacheSize = modelCache.size(); in PrepareModelFromModelCache() 310 ret = memManager->GetMemory(modelCache[i].data, memory); in PrepareModelFromModelCache()
|
H A D | hdi_device_v1_0.h | 53 OH_NN_ReturnCode PrepareModelFromModelCache(const std::vector<Buffer>& modelCache,
|
H A D | device.h | 57 virtual OH_NN_ReturnCode PrepareModelFromModelCache(const std::vector<Buffer>& modelCache,
|
/foundation/ai/neural_network_runtime/test/fuzztest/ |
H A D | nnrt_prepare_model_impl.h | 31 int32_t ExportModelCache(std::vector<SharedBuffer>& modelCache)
in ExportModelCache() argument
|
H A D | nnrt_device_impl.h | 103 int32_t PrepareModelFromModelCache(const std::vector<SharedBuffer>& modelCache, const ModelConfig& config,
in PrepareModelFromModelCache() argument
|
/foundation/ai/neural_network_runtime/example/drivers/nnrt/v1_0/hdi_cpu_service/src/ |
H A D | nnrt_device_service.cpp | 149 int32_t NnrtDeviceService::PrepareModelFromModelCache(const std::vector<SharedBuffer>& modelCache, in PrepareModelFromModelCache() argument 154 // modelCache must be 1, because PreparedModel only export one cache file. in PrepareModelFromModelCache() 155 if (modelCache.size() != 1) { in PrepareModelFromModelCache() 156 HDF_LOGE("The size of modelCache vector is not valid, it should be one elememt in that vector."); in PrepareModelFromModelCache() 161 auto ret = parser.Init(modelCache[0]); in PrepareModelFromModelCache() 175 ret = service->Compile(modelBuffer, modelCache[0].dataSize); in PrepareModelFromModelCache()
|
H A D | prepared_model_service.cpp | 48 int32_t PreparedModelService::ExportModelCache(std::vector<SharedBuffer>& modelCache) in ExportModelCache() argument 50 if (!modelCache.empty()) { in ExportModelCache() 60 modelCache.emplace_back(SharedBuffer {fd, size, 0, size}); in ExportModelCache() 89 modelCache.emplace_back(SharedBuffer {cache->GetAshmemFd(), cache->GetAshmemSize(), 0, cache->GetAshmemSize()}); in ExportModelCache()
|
/foundation/ai/neural_network_runtime/example/drivers/nnrt/v2_0/hdi_cpu_service/src/ |
H A D | prepared_model_service.cpp | 50 int32_t PreparedModelService::ExportModelCache(std::vector<SharedBuffer>& modelCache) in ExportModelCache() argument 52 if (!modelCache.empty()) { in ExportModelCache() 62 modelCache.emplace_back(SharedBuffer {fd, size, 0, size}); in ExportModelCache() 91 modelCache.emplace_back(SharedBuffer {cache->GetAshmemFd(), cache->GetAshmemSize(), 0, cache->GetAshmemSize()}); in ExportModelCache()
|
H A D | nnrt_device_service.cpp | 171 int32_t NnrtDeviceService::PrepareModelFromModelCache(const std::vector<SharedBuffer>& modelCache, in PrepareModelFromModelCache() argument 176 // modelCache must be 1, because PreparedModel only export one cache file. in PrepareModelFromModelCache() 177 if (modelCache.size() != 1) { in PrepareModelFromModelCache() 178 HDF_LOGE("The size of modelCache vector is not valid, it should be one elememt in that vector."); in PrepareModelFromModelCache() 183 auto result = parser.Init(modelCache[0]); in PrepareModelFromModelCache() 209 ret = service->Compile(modelBuffer, modelCache[0].dataSize); in PrepareModelFromModelCache()
|
/foundation/ai/neural_network_runtime/test/unittest/components/v2_0/device_registrar/ |
H A D | device_registrar_test.cpp | 67 virtual int32_t PrepareModelFromModelCache(const std::vector<V2_0::SharedBuffer>& modelCache, 142 OH_NN_ReturnCode PrepareModelFromModelCache(const std::vector<Buffer>& modelCache,
|
/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/device_registrar/ |
H A D | device_registrar_test.cpp | 67 virtual int32_t PrepareModelFromModelCache(const std::vector<V1_0::SharedBuffer>& modelCache, 142 OH_NN_ReturnCode PrepareModelFromModelCache(const std::vector<Buffer>& modelCache,
|
/foundation/ai/neural_network_runtime/test/unittest/components/v1_0/hdi_device/ |
H A D | hdi_device_test.cpp | 848 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 865 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 888 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 902 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 917 std::vector<Buffer> modelCache = { { nullptr, 0 } }; in HWTEST_F() local 921 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 943 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 959 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 981 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 997 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, confi in HWTEST_F() 1019 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 1057 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local [all...] |
/foundation/ai/neural_network_runtime/test/unittest/components/v2_0/hdi_device/ |
H A D | hdi_device_test.cpp | 990 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 1007 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 1030 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 1044 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 1059 std::vector<Buffer> modelCache = { { nullptr, 0 } }; in HWTEST_F() local 1063 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 1085 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 1101 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, config, preparedModel, isUpdatable); in HWTEST_F() 1123 std::vector<Buffer> modelCache = { { buffer, 100 } }; in HWTEST_F() local 1139 OH_NN_ReturnCode result = hdiDevice->PrepareModelFromModelCache(modelCache, confi in HWTEST_F() 1161 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 1199 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2362 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2402 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2431 std::vector<Buffer> modelCache = { { nullptr, 0 } }; HWTEST_F() local 2457 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2495 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2533 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local 2571 std::vector<Buffer> modelCache = { { buffer, 100 } }; HWTEST_F() local [all...] |