mobile_app_open
mobile_app_open copied to clipboard
User can abort a running benchmark
With https://github.com/mlcommons/mobile_app_open/pull/718 a long-running benchmark will be aborted after 10 minutes. But it doesn't work for the Offline scenario (see discussion at https://github.com/mlcommons/inference/issues/1397).
Another way to stop a running benchmark is to use:
/// \brief Aborts the running test.
/// \details This function will stop issueing new samples to the SUT. StartTest
/// will return after the current inference finishes. Since StartTest is a
/// blocking function, this function can only be called in another thread.
void AbortTest();
https://github.com/mlcommons/inference/blob/da9b4d54bd2bd2ae26316f75987d71103122e3ca/loadgen/loadgen.h#L79-L83
The app should have a button in the progress screen so that users can abort the running benchmark.
In my testing, AbortTest() did not work as expected. When calling AbortTest(), the app just hangs forever and StartTest() never finished.
The issue was discussed in https://github.com/mlcommons/mobile_app/issues/289, but there was no solution.
For reference, here is the branch with AbortTest() implemented: 749/abort-running-benchmark
@anhappdev to create an issue for loadgen