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>
26 static GeneralResult<SharedPreparedModel> PrepareArmnnModel(
31 const std::vector<SharedHandle>& modelCacheHandle,
32 const std::vector<SharedHandle>& dataCacheHandle,
33 const CacheToken& token,
34 bool float32ToFloat16 =
false,
35 Priority priority = Priority::MEDIUM);
37 static GeneralResult<SharedPreparedModel> PrepareArmnnModelFromCache(
41 const std::vector<SharedHandle>& modelCacheHandle,
42 const std::vector<SharedHandle>& dataCacheHandle,
43 const CacheToken& token,
44 bool float32ToFloat16 =
false);
49 static bool ValidateSharedHandle(
const SharedHandle& sharedHandle);
50 static bool ValidateDataCacheHandle(
const std::vector<SharedHandle>& dataCacheHandle,
const size_t dataSize);