Auto-vectorization for image processing DSLs
Open Access
- 21 June 2017
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 52 (5) , 21-30
Abstract
The parallelization of programs and distributing their workloads to multiple threads can be a challenging task. In addition to multi-threading, harnessing vector units in CPUs proves highly desirable. However, employing vector units to speed up programs can be quite tedious. Either a program developer solely relies on the auto-vectorization capabilities of the compiler or he manually applies vector intrinsics, which is extremely error-prone, difficult to maintain, and not portable at all. Based on whole-function vectorization, a method to replace control flow with data flow, we propose auto-vectorization techniques for image processing DSLs in the context of source-to-source compilation. The approach does not require the input to be available in SSA form. Moreover, we formulate constraints under which the vectorization analysis and code transformations may be greatly simplified in the context of image processing DSLs. As part of our methodology, we present control flow to data flow transformation as a source-to-source translation. Moreover, we propose a method to efficiently analyze algorithms with mixed bit-width data types to determine the optimal SIMD width, independently of the target instruction set. The techniques are integrated into an open source DSL framework. Subsequently, the vectorization capabilities are compared to a variety of existing state-of-the-art C/C++ compilers. A geometric mean speedup of up to 3.14 is observed for benchmarks taken from ISPC and image processing, compared to non-vectorized executions.Keywords
This publication has 22 references indexed in Scilit:
- HIPAcc: A Domain-Specific Language and Compiler for Image ProcessingIEEE Transactions on Parallel and Distributed Systems, 2015
- ExaSlang: A Domain-Specific Language for Highly Scalable Multigrid Solvers2014
- Hybrid type legalization for a sparse SIMD instruction setACM Transactions on Architecture and Code Optimization, 2013
- Halide2013
- Improving Performance of OpenCL on CPUs2012
- Efficient Computation of Optical Flow Using the Census Transform2004
- Exploiting superword level parallelism with multimedia instruction sets2000
- The discrete wavelet transform: wedding the a trous and Mallat algorithmsIEEE Transactions on Signal Processing, 1992
- A comparative study of automatic vectorizing compilersParallel Computing, 1991
- A Combined Corner and Edge Detector1988