VizGen
Autor: | Yuting Yang, Connelly Barnes, Sam Prestwood |
---|---|
Rok vydání: | 2016 |
Předmět: |
Array access analysis
Programming language Computer science Intrinsic function Embarrassingly parallel 020207 software engineering 02 engineering and technology Parallel computing Python (programming language) Data structure computer.software_genre Computer Graphics and Computer-Aided Design Execution time Functional compiler Compiler construction 020204 information systems 0202 electrical engineering electronic engineering information engineering Interprocedural optimization Compiler MATLAB computer computer.programming_language Compiler correctness |
Zdroj: | ACM Transactions on Graphics. 35:1-13 |
ISSN: | 1557-7368 0730-0301 |
DOI: | 10.1145/2980179.2982403 |
Popis: | This paper introduces a novel domain-specific compiler, which translates visual computing programs written in dynamic languages to highly efficient code. We define "dynamic" languages as those such as Python and MATLAB, which feature dynamic typing and flexible array operations. Such language features can be useful for rapid prototyping, however, the dynamic computation model introduces significant overheads in program execution time. We introduce a compiler framework for accelerating visual computing programs, such as graphics and vision programs, written in generalpurpose dynamic languages. Our compiler allows substantial performance gains (frequently orders of magnitude) over general compilers for dynamic languages by specializing the compiler for visual computation. Specifically, our compiler takes advantage of three key properties of visual computing programs, which permit optimizations: (1) many array data structures have small, constant, or bounded size, (2) many operations on visual data are supported in hardware or are embarrassingly parallel, and (3) humans are not sensitive to small numerical errors in visual outputs due to changing floating-point precisions. Our compiler integrates program transformations that have been described previously, and improves existing transformations to handle visual programs that perform complicated array computations. In particular, we show that dependent type analysis can be used to infer sizes and guide optimizations for many small-sized array operations that arise in visual programs. Programmers who are not experts on visual computation can use our compiler to produce more efficient Python programs than if they write manually parallelized C, with fewer lines of application logic. |
Databáze: | OpenAIRE |
Externí odkaz: |