Fix caching interface according to vendor feedback.
There are three major changes - Instead of isCachingSupport returning a single boolean, switch to getNumberOfCacheFilesNeeded returning the number of cache files. This is to support use cases when driver needs more than one cache file for each type, or when driver does not need data cache. - Instead of a separate saveToCache, pass cache info along with prepareModel_1_2 to save into cache as well as perform compilation. This is to avoid a potential additional copy of cache files. - Grant RDWR permission for prepareModelFromCache and prepareModel_1_2. This is for the driver to be able to read/update later, e.g. multi-stage compilation that does a fast compilation first and refines later. Bug: 123780248 Test: NeuralNetworksTest_static Change-Id: Id370919b742a60bf1f3277c3bc6bda1e8475f1da Merged-In: Id370919b742a60bf1f3277c3bc6bda1e8475f1da (cherry picked from commit d83197cb)
Loading
Please sign in to comment