OpenMP for Embedded Systems Sunita Chandrasekaran Asst. Professor Dept. of Computer & Informa on Sciences University of Delaware [email protected] ACK: Peng Sun, Suyang Zhu, Cheng Wang, Barbara Chapman, Tobias Schuele, Marcus Winter
Talk @ the OpenMP Booth #611, November 16, 2016 Heterogeneous Embedded Systems
• Incorporates specialized processing capabilities to handle specific tasks • Example • CPU + GPU • ARM + GPU • ARM + DSP • CPU + FPGA
Figure. Qualcomm SnapdragonTm 810 Block Diagram Figure. NVIDIA Tregra K1 Block Diagram 2 Programming Multicore Embedded Systems – A
3Real Challenge • Heterogeneous systems present complexity at both silicon and system level • Standards and tool-chain in embedded industry are proprietary • Portability and scalability issues • High time-to-market (TTM) solutions • We need industry standards – To offer portable and scalable software solutions and target more than one platform • How suitable are the state-of-the-art models for heterogeneous embedded systems?
• Not portable across more than one type of platform except for OpenCL • Most models are heavy-weight for embedded processors of limited resources • Most models require support from OS and compilers – Sometimes embedded systems are bare-metal • Some of the solutions are restricted to just the homogeneous environment
4 So what do we really need? • Something that’s not too low-level • Something light-weight • Something that can target heterogeneous embedded platforms (beyond CPUs-GPUs) • Something that can help speed time-to-market for products • Last but not the least – we need industry standards
Using industry standards • Two of them used for this work – OpenMP • (high-level, directive-based) – Multicore Association (MCA) APIs • (low-level, light-weight catered to embedded systems) Briefly, on OpenMP Implementations OpenMP Code Transla on int main(void) _INT32 main() • Directives implemented via code { { modification and insertion of runtime library calls int a,b,c; int a,b,c; #pragma omp parallel \ /* microtask */ – Typical approach is outlining of private(c) code in parallel region void __ompregion_main1() do_sth(a,b,c); { – Or generation of micro tasks return 0; _INT32 __mplocal_c; • Runtime library responsible for } /*shared variables are kept intact, managing threads subs tute accesses to private – Scheduling loops variable*/ – Scheduling tasks do_sth(a, b, __mplocal_c); – Implementing synchronization } • Implementation effort is reasonable … /*OpenMP run me calls */ __ompc_fork(&__ompregion_main 1); … Each compiler has custom run-time support. Quality of the } runtime system has major impact on performance. 7 History of OpenMP*
In spring, 7 Unified Fortran Incorporates Supports vendors and the and C/C++: task parallelism. offloading DOE agree on Bigger than both A hard problem execution to OpenMP the spelling of cOMPunity, the individual as OpenMP accelerator and supports parallel loops group of specifications struggles to OpenMP users, coprocessor taskloops, task and form the combined. maintain its is formed and devices, SIMD priorities, OpenMP ARB. The first thread-based organizes parallelism, and doacross loops, By October, International nature, while more. Expands and hints for version 1.0 of Minor workshops on Workshop on accommodating OpenMP beyond locks. Offloading the OpenMP modifications. OpenMP in OpenMP is held. the dynamic Support min/max North America, reductions in C/ traditional now supports specification for It becomes a nature of Europe, and C++. boundaries. asynchronous Fortran is 1.1 major forum for tasking. Asia. execution and released. users to interact with vendor. dependencies to ? 3.0 3.1 4.0 host execution. 1.0 2.0 2.5 4.5 5.0
First hybrid The merge of applications with Fortran MPI* and and C/C+ OpenMP appear. specifications begins.
1.0 2.0
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018
26 25 26 22 17 17 19 13 13 13 15 15 8 8 8 11 11 11 11
Permanent ARB Auxiliary ARB
Placeholder Footer Copy / BU Logo or Name Goes Here 8 Multicore Association APIs (MCA) Multicore Association APIs • Develops standards to reduce complexity involved in writing software for multicore chips! • Capturing the basic elements and abstract hardware and system resources! • Cohesive set of foundation APIs! Standardize communication (MCAPI)! Resource Sharing (MRAPI)! Task Management (MTAPI)
Outline Introduction Related Work Work Completed Proposed Work Plan of Work Acknowledgment
Peng Sun Peng Sun Nov.24 2016 Nov.24 2016 11 Programming Model Multicore Task Management API (MTAPI)
MulticoreThe Multicore Association Task develops andManagement promotes open specifications for multicoreAPI product (MTAPI) development.
MTAPI Contributing members: Tasks