• DocumentCode
    1972849
  • Title

    MATLAB Parallelization through Scalarization

  • Author

    Shei, Chun-Yu ; Yoga, Adarsh ; Ramesh, Madhav ; Chauhan, Arun

  • Author_Institution
    Sch. of Inf. & Comput., Indiana Univ., Bloomington, IN, USA
  • fYear
    2011
  • fDate
    12-12 Feb. 2011
  • Firstpage
    44
  • Lastpage
    53
  • Abstract
    While the popularity of using high-level programming languages such as MATLAB for scientific and engineering applications continues to grow, its poor performance compared to traditional languages such as Fortran or C continues to impede its deployment in full-scale simulations and data analysis. Additionally, its poor memory performance limits its performance. To ameliorate performance, we have been developing a MATLAB and Octave compiler that improves performance of MATLAB code by performing type inference and using the resulting type information to remove common bottlenecks. We observe that unlike past results, scalarizing array statements, instead of vectorizing scalar statements, is more fruitful when compiling MATLAB to C or C++. Two important situations where such scalarization helps is in expressions containing array subscripts and sequences of related array statements. In both cases, it is possible to generate fused loops and replace array temporaries by scalars, thus reducing the memory bandwidth pressure. Additional array temporaries are obviated in the case of array subscripts. Further, starting with vectorized statements guarantees that the resulting loops can be parallelized, creating opportunities for a mix of thread-level and instruction-level parallelism as well as GPU execution. We have implemented this strategy in a MATLAB compiler that compiles portions of MATLAB to C++ or CUDA C. Evaluation results on a set of benchmarks selected from diverse domains shows speed improvements ranging from 1.5x to almost 17x on an eight-core Intel Core 2 Duo machine.
  • Keywords
    C++ language; computer graphic equipment; coprocessors; high level languages; mathematics computing; parallel architectures; parallelising compilers; program control structures; reasoning about programs; type theory; C++ language; CUDA C language; GPU execution; MATLAB code; MATLAB compiler; MATLAB parallelization; Octave compiler; array statement scalarization; array statements; array subscript; data analysis; full-scale simulation; fused loops; high-level programming language; instruction-level parallelism; memory bandwidth pressure; memory performance; thread-level parallelism; type inference; type information; Arrays; Clustering algorithms; Graphics processing unit; Libraries; MATLAB; Optimization; Parallel processing; GPU; MATLAB; SSE; parallelization;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Interaction between Compilers and Computer Architectures (INTERACT), 2011 15th Workshop on
  • Conference_Location
    San Antonio, TX
  • ISSN
    1550-6207
  • Print_ISBN
    978-1-4577-0834-3
  • Electronic_ISBN
    1550-6207
  • Type

    conf

  • DOI
    10.1109/INTERACT.2011.18
  • Filename
    5936696