return ANEURALNETWORKS_NO_ERROR;
}
+int ANeuralNetworksCompilation_setPreference(ANeuralNetworksCompilation *compilation,
+ int32_t preference)
+{
+ // NOTE Pure CL runimte currently ignores this API call
+ // TODO Use preference
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
int ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation *compilation)
{
arm_compute::CLScheduler::get().default_init();
return ANEURALNETWORKS_NO_ERROR;
}
+
+void ANeuralNetworksCompilation_free(ANeuralNetworksCompilation *compilation)
+{
+ delete compilation;
+}
SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_create);
SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_finish);
+ // ANeuralNetworksCompilation_setPreference and ANeuralNetworksCompilation_free
+ // are introduced to reuse NNAPI tests under runtimes/tests. Note that these APIs
+ // are not necessary for supporting Tensorflow Lite interperter
+ SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_setPreference);
+ SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_free);
SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_create);
SHOW_FUNC_ENTRY(ANeuralNetworksExecution_create);
// NOTE Pure CL runtime does not implement following NN API(s) as
// Tensorflow Lite does not use these API(s)
- // SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_free);
- // SHOW_FUNC_ENTRY(ANeuralNetworksCompilation_setPreference);
// SHOW_FUNC_ENTRY(ANeuralNetworksExecution_setInputFromMemory);
// SHOW_FUNC_ENTRY(ANeuralNetworksExecution_setOutputFromMemory);