MARE Parallel Computing SDK
MARE (Multicore Asynchronous Runtime Environment) is a developer programming library and API that enables Android native code developers to harness the benefits of multicore SOCs (System on Chip) in smartphones & tablets
MARE provides powerful and easy to use abstractions to write parallel software that can better harness the compute potential of multicore CPUs in mobile SOCs. By hiding the complexities of multi-threading, MARE allows you to focus on implementing a parallel algorithm in a more productive manner. This is achieved by defining different pieces of independent work (tasks) in the code along with their relationships (dependencies amongst those tasks) in an efficient way allowing for a scalable, and more efficient approach to implementing multicore parallelism than directly dealing with threads.
Qualcomm Research has developed MARE so that it can be used on Android devices powered by any SoC, not just Qualcomm Snapdragon. If you port or develop your application with MARE, you can expect to see the benefits of multicore on almost any multicore Android device.
Performance oriented workloads and use cases that are increasingly being developed with the Android NDK will benefit from using MARE. These include:
- Computer vision scenarios
- Gestures and natural interface engines
- Image & video processing
Optimize Performance and Power
This video demonstrates the capabilities of Qualcomm MARE to optimize performance and power. The application is a physics simulation of collapsing buildings, rendered in 3D using the Ogre engine. The physics simulation is based on the Bullet physics library which was parallelized using MARE. The parallelization more than doubles the performance of the simulation, from ~15fps to ~32fps, when running on a 4-core Qualcomm Snapdragon 800 at maximum performance. In addition, MARE provides a set of APIs for power management. Using these APIs, we limited the rate of the simulation to 30fps, which resulted in about 20% energy savings, with no noticeable performance degradation. Helping developers optimize their applications for power is important to extend the battery life of mobile devices, and MARE enables these optimizations on the Snapdragon platform with an API that relieves programmers from the complexities of managing threads, cores, and frequencies.
In the video, the left half shows the simulation running at the maximum performance, and the right half, the simulation running using the MARE power management API. Using the MARE API that specifies the quality of service desired, the MARE runtime constantly adapts and tunes the frequency and number of cores used by the application to minimize the energy consumption while satisfying the desired performance. The top part of the video shows the running simulations, and notice the frame rate counters. The bottom part of the video shows the power consumption of both devices using the Qualcomm software informer (QEPM), and the 20% reduction in power consumption for the energy optimized application.