Overview
Hipacc allows to design image processing kernels and algorithms in a domain-specific language (DSL). From this high-level description, low-level target code for GPU accelerators is generated using source-to-source translation. As back ends, the framework supports C/C++, CUDA, OpenCL, and Renderscript. There is also a fork of Hipacc that targets FPGAs.
Hipacc allows programmers to develop imaging applications while providing high productivity, flexibility and portability as well as competitive performance: the same algorithm description serves as basis for targeting different GPU accelerators and low-level languages.
Example: Linear Filters
The LinearFilter class shown below can be instantiated with a given filter mask. This will specialize the class for the filter mask such that optimized implementations emerge from the same high-level description. Examples for this filter class are the Gaussian blur filter, the Laplace operator, or the Sobel operator.
class LinearFilter : public Kernel<uchar4> { private: Accessor<uchar4> &input; Mask<float> &mask; public: LinearFilter(IterationSpace<uchar4> &iter, Accessor<uchar4> &input, Mask<float> &mask) : Kernel(iter), input(input), mask(mask) { add_accessor(&input); } void kernel() { float4 sum = convolve(mask, Reduce::SUM, [&] () -> float4 { return mask() * convert_float4(input(mask)); }); output() = convert_uchar4(sum + 0.5f); } };
Authors
The developers of Hipacc are Richard Membarth (@richardmembarth), Oliver Reiche (@oreiche), Mehmet Akif Özkan (@akifoezkan), and Bo Qiao (@qiao-bo).
Publications
Main Publications
Richard Membarth, Oliver Reiche, Frank Hannig, Jürgen Teich, Mario Körner, and Wieland Eckert
HIPAcc: A Domain-Specific Language and Compiler for Image Processing
In Transactions on Parallel and Distributed Systems (TPDS), 27(1), pp. 210-224, 2016.
Oliver Reiche, Mehmet Akif Özkan, Richard Membarth, Jürgen Teich, and Frank Hannig
Generating FPGA-based Image Processing Accelerators with Hipacc
In Proceedings of the International Conference on Computer Aided Design (ICCAD), pp. 1026-1033, Irvine, CA, USA, November 13–16, 2017. Invited Paper.
Selected Publications
Bo Qiao, Olver Reiche, Frank Hannig, and Jürgen Teich
From Loop Fusion to Kernel Fusion: A Domain-specific Approach to Locality Optimization
In Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), pp. 242-253, Washington, DC, USA, February 16-20, 2019.
Oliver Reiche
A Domain-Specific Language Approach for Designing and Programming Heterogeneous Image Systems
Dissertation, University of Erlangen-Nuremberg, pp. 1-215, ISBN 978-3-8439-3726-9, Verlag Dr. Hut, Munich, Germany, July 5, 2018.
Oliver Reiche, Christof Kobylko, Frank Hannig, and Jürgen Teich
Auto-vectorization for Image Processing DSLs
In Proceedings of the 18th International Conference on Languages, Compilers, Tools, and Theory for Embedded Systems (LCTES), pp. 21-30, Barcelona, Spain, June 21-22, 2017.
Mehmet Akif Özkan, Oliver Reiche, Frank Hannig, and Jürgen Teich
FPGA-Based Accelerator Design from a Domain-Specific Language
In Proceedings of the 26th International Conference on Field-Programmable Logic and Applications (FPL), pp. 1-9, Lausanne, Switzerland, August 29-September 2, 2016.
Oliver Reiche, Moritz Schmid, Frank Hannig, Richard Membarth, and Jürgen Teich
Code Generation from a Domain-specific Language for C-based HLS of Hardware Accelerators
In Proceedings of the International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS), pp. 17:1-17:10, New Delhi, India, October 12-17, 2014.
Richard Membarth, Oliver Reiche, Frank Hannig, and Jürgen Teich
Code Generation for Embedded Heterogeneous Architectures on Android
In Proceedings of the Conference on Design, Automation and Test in Europe (DATE), pp. 86:1-86:6, Dresden, Germany, March 24-28, 2014.
Richard Membarth
Code Generation for GPU Accelerators from a Domain-Specific Language for Medical Imaging
Dissertation, University of Erlangen-Nuremberg, pp. 1-215, ISBN 978-3-8439-1074-3, Verlag Dr. Hut, Munich, Germany, May 2, 2013.
Richard Membarth, Frank Hannig, Jürgen Teich, Mario Körner, and Wieland Eckert
Generating Device-specific GPU Code for Local Operators in Medical Imaging
In Proceedings of the 26th IEEE International Parallel & Distributed Processing Symposium (IPDPS), pp. 569-581, Shanghai, China, May 21-25, 2012.
Overview Poster
Richard Membarth and Oliver Reiche
HIPAcc: A Domain-Specific Language and Compiler for Image Processing
Poster Presentation at the GPU Technology Conference (GTC), San Jose, CA, USA, March 24-27, 2014.