CUDA vs OpenCL: Which should I use?

Introduction

If you are looking to get into GPU programming, you are currently faced with an annoying choice:

I maintain two packages for accelerated computing in Python, PyCuda and PyOpenCL, so obviously I can't decide either. Still, this is a common question, so this page compiles a number of facts to help you decide. Since the question is broad and difficult as it stands, this page will focus on the Python angle when there is any benefit in doing so.

This is a Wiki page on purpose. If you think you have something to add to this discussion, please do not hesitate to click "Edit" above.

Facts

Vendors

As of right now, there is one vendor of CUDA implementations, namely Nvidia Corporation.

The following vendors have OpenCL implementations available:

The following groups are or may be producing CL implementations:

Code Portability

Capabilities

Speed

Maintenance

An Attempt at a Conclusion

(Careful: While the above collection is supposed to consist of objective facts, this section is for personal opinion. Feel free to add yours.)

At the moment, I don't believe there is a "right" and a "wrong" choice. OpenCL and CUDA (and thereby PyOpenCL and PyCuda) both only provide the "mechanics" for GPU access. You'll likely spend much more time learning about the intricacies of the hardware, rather than these mechanics, and the hardware knowledge is easily portable between frameworks. Personally, I would be careful to not put too much weight on the decision for now. --AndreasKloeckner

CudaVsOpenCL (last edited 2010-03-08 17:11:41 by client-81-98-142-210)