From 6df71fd5a6ab655a4e9400c9a42df36e2864f67d Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Tue, 13 Oct 2020 17:50:05 +0100 Subject: IVGCVSW-5335 Documentation for fast_math * Changed documentation for fast_math to add warning about possibly reduction in precision. * Added -h,--help option to display command line help for the driver. * Added -V,--version option to display ArmNN version information for the driver. * Changed driver to display an error and the command line help if it cannot start for any reason. * Backend no longer defaults to GpuAcc. Signed-off-by: Mike Kelly Change-Id: I270b10ec9d485fd25e25680fc29ea1fc2b0e8e1d --- service.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'service.cpp') diff --git a/service.cpp b/service.cpp index 823f0c75..5191fbfe 100644 --- a/service.cpp +++ b/service.cpp @@ -19,6 +19,11 @@ int main(int argc, char** argv) { android::sp driver; DriverOptions driverOptions(argc, argv); + + if (driverOptions.ShouldExit()) + { + return driverOptions.GetExitCode(); + } try { driver = new ArmnnDriver(DriverOptions(argc, argv)); @@ -26,6 +31,8 @@ int main(int argc, char** argv) catch (const std::exception& e) { ALOGE("Could not create driver: %s", e.what()); + std::cout << "Unable to start:" << std::endl + << "Could not create driver: " << e.what() << std::endl; return EXIT_FAILURE; } @@ -38,15 +45,19 @@ int main(int argc, char** argv) catch (const std::exception& e) { ALOGE("Could not register service: %s", e.what()); + std::cout << "Unable to start:" << std::endl + << "Could not register service: " << e.what() << std::endl; return EXIT_FAILURE; } + if (status != android::OK) { ALOGE("Could not register service"); + std::cout << "Unable to start:" << std::endl + << "Could not register service" << std::endl; return EXIT_FAILURE; } - android::hardware::joinRpcThreadpool(); - ALOGE("Service exited!"); - return EXIT_FAILURE; + ALOGW("Service exited!"); + return EXIT_SUCCESS; } -- cgit v1.2.1