OpenCL Generation from MATLAB

In many engineering and science areas, models are developed and validated using high-level programing languages and environments as is the case with MATLAB. In order to target the multicore heterogeneous architectures being used on embedded systems to provide high performance computing with acceptable energy/power envelops, developers manually migrate critical code sections to lower-level languages such as C and OpenCL, a time consuming and error prone process. Thus, automatic source-tosource approaches are highly desirable. We present an approach to compile MATLAB and output equivalent C/OpenCL code to target architectures, such as GPU based hardware accelerators. We evaluate our approach on an existing MATLAB compiler framework named MATISSE. The OpenCL generation relies on the manual insertion of directives to guide the compilation and is also capable of generating C wrapper code to interface and synchronize with the OpenCL code. We evaluated the compiler with a number of benchmarks from different domains and the results are very encouraging.

[1]  David W. Scott,et al.  Box–Muller transformation , 2011 .

[2]  R. Govindarajan,et al.  Automatic compilation of MATLAB programs for synergistic execution on heterogeneous processors , 2011, PLDI '11.

[3]  João M. P. Cardoso,et al.  Multi-Target C Code Generation from MATLAB , 2014, ARRAY@PLDI.

[4]  Prithviraj Banerjee,et al.  An algebraic array shape inference system for MATLAB® , 2006, TOPL.

[5]  David A. Padua,et al.  Techniques for the translation of MATLAB programs into Fortran 90 , 1999, TOPL.

[6]  Prithviraj Banerjee,et al.  Static array storage optimization in MATLAB , 2003, PLDI '03.

[7]  Jo Compilation and Synthesis for Embedded Reconfigurable Systems , 2016 .

[8]  Eelco Visser,et al.  Turning dynamic typing into static typing by program specialization in a compiler front-end for Octave , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[9]  Arun Chauhan,et al.  MATLAB Parallelization through Scalarization , 2011, 2011 15th Workshop on Interaction between Compilers and Computer Architectures.

[10]  Jeremy Kepner,et al.  pMATLAB: Parallel MATLAB Library for Signal Processing Applications , 2007, 2007 IEEE International Conference on Acoustics, Speech and Signal Processing - ICASSP '07.

[11]  John Freeman,et al.  From opencl to high-performance hardware on FPGAS , 2012, 22nd International Conference on Field Programmable Logic and Applications (FPL).

[12]  Vijay Gadepally,et al.  MATLAB for Signal Processing on Multiprocessors and Multicores , 2010, IEEE Signal Processing Magazine.