Searched refs:cacheInfoPath (Results 1 – 5 of 5) sorted by relevance
/ohos5.0/foundation/ai/neural_network_runtime/frameworks/native/neural_network_runtime/ |
H A D | nncompiled_cache.cpp | 82 std::string cacheInfoPath = cacheDir + "/" + m_modelName + "cache_info.nncache"; in Restore() local 84 if (realpath(cacheInfoPath.c_str(), path) == nullptr) { in Restore() 88 if (access(cacheInfoPath.c_str(), F_OK) != 0) { in Restore() 94 OH_NN_ReturnCode ret = CheckCacheInfo(cacheInfo, cacheInfoPath); in Restore() 278 std::string cacheInfoPath = cachePath + "/" + m_modelName + "cache_info.nncache"; in WriteCacheInfo() local 279 … std::ofstream cacheInfoStream(cacheInfoPath, std::ios::binary | std::ios::out | std::ios::trunc); in WriteCacheInfo() 296 const std::string& cacheInfoPath) const in CheckCacheInfo() 299 std::ifstream infoCacheFile(cacheInfoPath.c_str(), std::ios::in | std::ios::binary); in CheckCacheInfo()
|
H A D | neural_network_runtime.cpp | 533 OH_NN_ReturnCode CheckCacheFile(const std::string& cacheInfoPath, int64_t& fileNumber, int64_t& cac… in CheckCacheFile() argument 537 if (realpath(cacheInfoPath.c_str(), path) == nullptr) { in CheckCacheFile() 582 …std::string cacheInfoPath = std::string(cacheDir) + "/" + std::string(modelName) + "cache_info.nnc… in OH_NNModel_HasCache() local 586 bool exist = (stat(cacheInfoPath.c_str(), &buffer) == 0); in OH_NNModel_HasCache() 593 OH_NN_ReturnCode returnCode = CheckCacheFile(cacheInfoPath, fileNumber, cacheVersion); in OH_NNModel_HasCache() 601 std::filesystem::remove_all(cacheInfoPath); in OH_NNModel_HasCache() 612 std::filesystem::remove_all(cacheInfoPath); in OH_NNModel_HasCache()
|
H A D | nncompiled_cache.h | 57 …rnCode CheckCacheInfo(NNCompiledCacheInfo& modelCacheInfo, const std::string& cacheInfoPath) const;
|
H A D | nncompiler.cpp | 658 …std::string cacheInfoPath = m_cachePath + "/" + m_extensionConfig.modelName + "cache_info.nncache"; in RestoreFromCacheFile() local 659 ret = compiledCache.CheckCacheInfo(modelCacheInfo, cacheInfoPath); in RestoreFromCacheFile()
|
/ohos5.0/foundation/ai/neural_network_runtime/test/unittest/components/nn_compiled_cache/ |
H A D | nn_compiled_cache_test.cpp | 529 std::string cacheInfoPath = "MOCK"; variable 531 OH_NN_ReturnCode ret = nncompiledCache.CheckCacheInfo(modelCacheInfo, cacheInfoPath); 546 std::string cacheInfoPath = "/data/data/0.nncache"; variable 548 OH_NN_ReturnCode ret = nncompiledCache.CheckCacheInfo(modelCacheInfo, cacheInfoPath); 563 std::string cacheInfoPath = "/data/data/testcache_info.nncache"; variable 565 OH_NN_ReturnCode ret = nncompiledCache.CheckCacheInfo(modelCacheInfo, cacheInfoPath); 587 std::string cacheInfoPath = "/data/data/testcache_info.nncache"; variable 589 OH_NN_ReturnCode ret = nncompiledCache.CheckCacheInfo(modelCacheInfo, cacheInfoPath);
|