We present our experience in porting optimized CUDA implementations to oneAPI. We focus on the use case of numerical integration, particularly the CUDA implementations of PAGANI and $m$-Cubes. We faced several challenges that caused performance degradation in the oneAPI ports. These include differences in utilized registers per thread, compiler optimizations, and mappings of CUDA library calls to oneAPI equivalents. After addressing those challenges, we tested both the PAGANI and m-Cubes integrators on numerous integrands of various characteristics. To evaluate the quality of the ports, we collected performance metrics of the CUDA and oneAPI implementations on the Nvidia V100 GPU. We found that the oneAPI ports often achieve comparable performance to the CUDA versions, and that they are at most 10% slower.
翻译:本文介绍了将优化的CUDA实现移植到oneAPI的经验。我们聚焦于数值积分用例,特别是PAGANI和$m$-Cubes的CUDA实现。我们遇到了若干挑战,导致oneAPI移植版本出现性能下降,包括每个线程使用的寄存器数量差异、编译器优化差异以及CUDA库调用至对应oneAPI函数映射的差异。在解决这些挑战后,我们在多种不同特性的被积函数上测试了PAGANI和m-Cubes积分器。为评估移植质量,我们收集了CUDA与oneAPI实现在Nvidia V100 GPU上的性能指标。结果表明,oneAPI移植版本通常能达到与CUDA版本相当的性能,且性能下降最多不超过10%。