12 #include <nnapi/IPreparedModel.h>
13 #include <nnapi/Result.h>
14 #include <nnapi/TypeUtils.h>
15 #include <nnapi/Types.h>
16 #include <nnapi/Validation.h>
27 static GeneralResult<SharedPreparedModel> PrepareArmnnModel(
32 const std::vector<SharedHandle>& modelCacheHandle,
33 const std::vector<SharedHandle>& dataCacheHandle,
34 const CacheToken& token,
35 bool float32ToFloat16 =
false,
36 Priority priority = Priority::MEDIUM);
39 static GeneralResult<SharedPreparedModel> PrepareArmnnModelFromCache(
43 const std::vector<SharedHandle>& modelCacheHandle,
44 const std::vector<SharedHandle>& dataCacheHandle,
45 const CacheToken& token,
46 bool float32ToFloat16 =
false);
51 static bool ValidateSharedHandle(
const SharedHandle& sharedHandle);
52 static bool ValidateDataCacheHandle(
const std::vector<SharedHandle>& dataCacheHandle,
const size_t dataSize);