CUDA与OpenCL的性能比较
A Performance Comparison of CUDA and OpenCL
摘要:
CUDA和OpenCL是两种不同的GPU编程框架。OpenCL是一种开放标准,可用于对来自不同供应商的CPU、GPU和其他设备进行编程,而CUDA则专用于NVIDIA GPU。虽然OpenCL承诺为GPU编程提供一种可移植的语言,但其通用性可能会带来性能损失。在本文中,我们使用来自量子蒙特卡罗应用程序的复杂的,几乎相同的内核来比较CUDA和OpenCL的性能。我们表明,使用NVIDIA编译器工具时,将CUDA内核转换为OpenCL内核涉及最小的修改。使用ATI的构建工具编译这样的内核涉及到更多的修改。我们的性能测试测量并比较了CUDA和OpenCL的GPU之间的数据传输时间、内核执行时间以及端到端应用程序执行时间。
英文摘要:
CUDA and OpenCL are two different frameworks for GPU programming. OpenCL is an open standard that can be used to program CPUs, GPUs, and other devices from different vendors, while CUDA is specific to NVIDIA GPUs. Although OpenCL promises a portable language for GPU programming, its generality may entail a performance penalty. In this paper, we use complex, near-identical kernels from a Quantum Monte Carlo application to compare the performance of CUDA and OpenCL. We show that when using NVIDIA compiler tools, converting a CUDA kernel to an OpenCL kernel involves minimal modifications. Making such a kernel compile with ATI's build tools involves more modifications. Our performance tests measure and compare data transfer times to and from the GPU, kernel execution times, and end-to-end application execution times for both CUDA and OpenCL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。