Integrate 10/15 hexagon nnlib drop
Additionally configured service to restart driver after the driver has
crashed.
Bug: 67478959
Test: mm, vts, cts
Change-Id: I4b95292e1fd4424676e049b08953ac00e4ab22f3
diff --git a/1.0/Device.cpp b/1.0/Device.cpp
index 29437f8..3d16523 100644
--- a/1.0/Device.cpp
+++ b/1.0/Device.cpp
@@ -88,7 +88,7 @@
void Device::asyncPrepare(const Model& model, const sp<IPreparedModelCallback>& callback) {
std::shared_ptr<hexagon::Model> hexagonModel = std::make_shared<hexagon::Model>(model);
- if (hexagonModel->compile()) {
+ if (hexagonModel->prepare()) {
callback->notify(ErrorStatus::NONE, new PreparedModel(model, hexagonModel));
}
else {
@@ -113,9 +113,9 @@
return ErrorStatus::DEVICE_UNAVAILABLE;
}
- // This thread is intentionally detached because the sample driver service
- // is expected to live forever.
- std::thread([this, model, callback]{ asyncPrepare(model, callback); }).detach();
+ // TODO: once nnlib hanging issue is resolved, make this function
+ // asynchronous again
+ asyncPrepare(model, callback);
return ErrorStatus::NONE;
}