@inproceedings{10.5555/3433701.3433830, author = {Henriksen, Troels and Hellfritzsch, Sune and Sadayappan, Ponnuswamy and Oancea, Cosmin}, title = {Compiling Generalized Histograms for GPU}, year = {2020}, isbn = {9781728199986}, publisher = {IEEE Press}, abstract = {We present and evaluate an implementation technique for histogram-like computations on GPUs that ensures both work-efficient asymptotic cost, support for arbitrary associative and commutative operators, and efficient use of hardware-supported atomic operations when applicable. Based on a systematic empirical examination of the design space, we develop a technique that balances conflict rates and memory footprint.We demonstrate our technique both as a library implementation in CUDA, as well as by extending the parallel array language Futhark with a new construct for expressing generalized histograms, and by supporting this construct with several compiler optimizations. We show that our histogram implementation taken in isolation outperforms similar primitives from CUB, and that it is competitive or outperforms the hand-written code of several application benchmarks, even when the latter is specialized for a class of datasets.}, booktitle = {Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis}, articleno = {97}, numpages = {14}, keywords = {parallelism, GPU, functional programming}, location = {Atlanta, Georgia}, series = {SC '20} }