We describe the experience of converting a CUDA implementation of a high-order epistasis detection algorithm to SYCL. The goals are for our work to be useful to application and compiler developers with a detailed description of migration paths between CUDA and SYCL. Evaluating the CUDA and SYCL applications on an NVIDIA V100 GPU, we find that the optimization of loop unrolling needs to be applied manually to the SYCL kernel for obtaining comparable performance. The performance of the SYCL group reduce function, an alternative to the CUDA warp-based reduction, depends on the problem and work group sizes. The 64-bit popcount operation implemented with tree of adders is slightly faster than the built-in popcount operation. When the number of OpenMP threads is four, the highest performance of the SYCL and CUDA applications are comparable.
Field-programmable gate arrays (FPGAs) are becoming one of heterogeneous computing components in highperformance computing. To facilitate the use of FPGAs for developers and researchers, high-level synthesis tools are pushing the FPGA-based design abstraction from the register-transfer level to high-level language design flow using OpenCL/C/C++. Currently, there are few studies on the atomic functions in the OpenCL-based design flow on an FPGA. In this paper, we evaluate the performance of atomic functions using a reduction kernel on an OpenCL FPGA platform as a case study. We describe the implementations of an integer sum-reduction kernel in OpenCL, and perform the optimizations of memory accesses. Fully utilizing the bandwidth of the data bus can bring a factor of 15 improvement over the baseline kernel. The performance speedup of the kernel using local memory for atomic operations is 6.8X over the naïve kernel using global memory. The combination of both optimizations can lead to 112X speedup. Compute unit duplication can be applied to the kernel to further improve the performance by a factor of 2.9.