This paper is about universal libraries for parallel programming in C and C++, focusing on OpenCL and SYCL. The low-level approach of OpenCL offers precise control over heterogeneous devices, while the abstraction of SYCL allows for writing of higher-level parallel computing programs in C++. We tested the two frameworks on three algorithms covering the areas most commonly used by GPUs, which are computing hash values, image processing and training neural networks. The results showed that the algorithm written using the OpenCL framework outperformed the algorithm written using the SYCL framework for all three algorithms in terms of speed, but the SYCL framework required less code and had better readability.
|