We introduce a library supporting execution of data parallel kernels on GPUs from Erlang. The library provides calls with the same semantics of the map and fold functions of the lists Erlang library, where the functions to be computed on the input list(s) are actually provided as OpenCL C kernels. The map and reduce (fold) higher order functions are provided in such a way that subsequent calls may leave temporary data (partial results) on the GPU memory while computing complex, possibly composed data parallel patterns. In addition, data transfers to and from the GPU, from and to the Erlang subsystem, are overlapped with Erlang to C and C to Erlang marshaling, such that the cost of the overall type conversion is minimized. We assess the performances of the data parallel library via simple synthetic benchmarks and real application kernels showing substantial speedups with respect to pure Erlang implementation of the same synthetic benchmarks/application kernels.
IOS Press, Inc.
6751 Tepper Drive
Clifton, VA 20124
Tel.: +1 703 830 6300
Fax: +1 703 830 2300 email@example.com
(Corporate matters and books only) IOS Press c/o Accucoms US, Inc.
For North America Sales and Customer Service
West Point Commons
Lansdale PA 19446
Tel.: +1 866 855 8967
Fax: +1 215 660 5042 firstname.lastname@example.org