A Comparison of OpenCL, CUDA, and HIP as Compilation Targets for a Functional Array Language

Troels Henriksen*

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review

Abstract

This paper compares OpenCL, CUDA, and HIP as compilation targets for Futhark, a functional array language. We compare the performance of OpenCL versus CUDA, and OpenCL versus HIP, on the code generated by the Futhark compiler on a collection of 48 application benchmarks on two different GPUs. Despite the generated code in most cases being equivalent, we observe significant performance differences on the same hardware, ranging from 0.42x to 1.72x in the most extreme cases. We identify the root causes of most of these differences, many of which are due to relatively superficial details such as inconsistent defaults regarding compiler optimisation and numerical accuracy, although a few remain mysterious.

Original languageEnglish
Title of host publicationFProPer 2024 - Proceedings of the 1st ACM SIGPLAN International Workshop on Functional Programming for Productivity and Performance, Co-located with : ICFP 2024
EditorsMike Rainey, Sven-Bodo Scholz
Number of pages9
PublisherAssociation for Computing Machinery, Inc.
Publication date2024
ISBN (Electronic)9798400711008
DOIs
Publication statusPublished - 2024
Event1st ACM SIGPLAN International Workshop on Functional Programming for Productivity and Performance, FProPer 2024 - Milan, Italy
Duration: 6 Sep 2024 → …

Conference

Conference1st ACM SIGPLAN International Workshop on Functional Programming for Productivity and Performance, FProPer 2024
Country/TerritoryItaly
CityMilan
Period06/09/2024 → …
SponsorACM SIGPLAN

Bibliographical note

Publisher Copyright:
© 2024 held by the owner/author(s).

Keywords

  • functional programming
  • GPU
  • parallel programming
  • performance measurement

Cite this