Friday, November 8, 2019

OpenCL vs. CUDA: Which Has Better Application Support?

It’s a GPGPU/GPU Acceleration real-world face-off we’ve got on our hands here! If you’re looking for more information on CUDA and OpenCL, this is the article for you. We’ll give you a brief overview of what GPGPU is and look at how AMD, Nvidia, OpenCL & CUDA fit into the mix. Finally, we will explain which applications work best with which brand of graphics cards, providing a list that gives a brief overview of CUDA/OpenCL support in a wide variety of professional apps.

Introduction to GPGPU (General Purpose Computing on Graphics Processing Units)

If you’ve never heard of GPGPU or GPU acceleration, don’t worry, most people haven’t, but custom Apple computer experts like ourselves do, and we can explain! OpenCL and CUDA, however, are terms that are starting to become more and more prevalent in the professional computing sector. OpenCL and CUDA are software frameworks that allow GPGPU to accelerate processing in applications where they are respectively supported.
So what exactly is GPGPU, or general purpose computing on graphics processing units?
GPGPU is the utilisation of a GPU (graphics processing unit), which would typically only handle computer graphics, to assist in performing tasks that are traditionally handled solely by the CPU (central processing unit).
In traditional computing, data can be passed from the CPU to the GPU, the GPU then renders the data, but the GPU cannot pass information back. GPGPU allows information to be transferred in both directions, from CPU to GPU and GPU to CPU. Such bidirectional processing can hugely improve efficiency in a wide variety of tasks related to images and video. If the application you use supports OpenCL or CUDA, you will normally see huge performance boosts when using hardware that supports the relevant GPGPU framework.
So now you know what GPGPU is, how do OpenCL and CUDA fit into the equation? OpenCL is currently the leading open source GPGPU framework. CUDA, on the other hand, is the leading proprietary GPGPU framework.


Where Do Nvidia & AMD Sit in the GPGPU Spectrum?

AMD NVIDIA OPENCL CUDAFortunately, AMD & Nvidia have made the debate slightly more black and white than it may have originally seemed. To cut to the chase, AMD support OpenCL and Nvidia support their own proprietary CUDA framework. So which framework do the major applications support you may ask? This is where things can get a little more complicated. Different apps support different GPGPU frameworks, in fact, some support both OpenCL and CUDA and some support neither.
Naturally, your next question will be “does my application of choice support CUDA or OpenCL?”. Or “so if my application supports both, which should I go for?”. Don’t worry, that’s what we’re going to help you with today.
It should be noted that Nvidia cards actually support OpenCL as well as CUDA, they just aren’t quite as efficient as AMD GPUs when it comes to OpenCL computation. This is changing though as the recently released Nvidia GTX 980 is a very capable OpenCL card as well as a CUDA monster. We can only see Nvidia’s OpenCL performance getting better and better in the future, and this is definitely something worth considering.

What Are the Strengths of CUDA Acceleration?

Nvidia TITAN CUDAAs we have already stated, the main difference between CUDA and OpenCL is that CUDA is a proprietary framework created by Nvidia and OpenCL is open source. Each of these approaches brings their own pros and cons which we will highlight in this section.
The general consensus is that if your app of choice supports both CUDA and OpenCL, go with CUDA as it will generate better performance results. The main reason for this is that Nvidia provide top quality support to app developers who choose to use CUDA acceleration, therefore the integration is always fantastic. For example, if we look at the Adobe CC, which supports both CUDA and OpenCL, CUDA accelerates more features and provides better acceleration to the features that both frameworks are able to power. If we look at Premiere Pro CS6, without CUDA only software-based playback is available . For further reading, in a forum thread on Creative Cow, an Adobe employee stated that in most cases CUDA would out-perform OpenCL .
Another good example of the difference between CUDA and OpenCL support can be seen in REDCINE-X. If you enable OpenCL, only 1 GPU can be utilised, however, when CUDA is enabled 2 GPUs can be used for GPGPU.
Obviously, because CUDA is a proprietary framework it requires Nvidia’s support and time to integrate it into applications, this means that the functionality is always fantastic. However, CUDA is not as easy for apps to adopt as OpenCL (as it is open-source). Regardless of this, CUDA is still supported by a wide variety of apps of which the list continues to grow.
As an easy rule of thumb, if your app supports CUDA, grab an Nvidia card, even if it also supports OpenCL.

What Are the Strengths of the OpenCL Platform?

AMD 7970 OpenCLSo now onto OpenCL, the open-source GPGPU framework. We’ve already mentioned that if your software supports both OpenCL and CUDA, then go for CUDA, but what if OpenCL is the only choice?
Simply put, if OpenCL is your only option, go for it. For example, Final Cut Pro X only supports OpenCL, and we usually recommend that our users put AMD OpenCL cards into their systems if they use the popular video editing app. On a whole OpenCL integration generally isn’t as tight as CUDA, but OpenCL will still produce significant performance boosts when used and is far better than not using GPGPU at all.
As we stated earlier, Nvidia cards also utilise the OpenCL framework, but they aren’t as efficient currently as AMD cards (however, they are catching up fast). So if the apps you use are all exclusively OpenCL based and don’t have CUDA support, such as Final Cut Pro X, we recommend you equip your system with an OpenCL AMD GPU.

Some of My Applications Are CUDA-Based & Some Just Have OpenCL Support. What Should I Do?

If the applications you use split their support between CUDA and OpenCL we recommend using a recent Nvidia card. With an Nvidia setup, you will get the most out of your CUDA enabled apps whilst still having good OpenCL capability in non-CUDA apps.
For example, the Nvidia GTX 780 would supercharge all your CUDA based computation whilst still scoring 1700 in LuxMark Sala (OpenCL benchmark) giving it significant grunt in apps that are OpenCL based such as Final Cut Pro X. An even newer Nvidia GPU such as the GTX 980 scores 2600 in LuxMark Sala, a higher score than the AMD R9 280X (which scores 2400), giving you the best of both worlds. If you use Adobe CC, or other CUDA supported apps, as well as OpenCL exclusive software such as Final Cut Pro X the Nvidia GTX 780 and 980, are both solid solutions.

Which Applications Support Which GPGPU Framework?

Here we’ll briefly list a number of applications with GPGPU support, which framework they work with, and if published how GPGPU is used in the application. Please note that this list isn’t comprehensive, it simply contains major apps and relevant easily accessible information. Nvidia provides it’s own list of CUDA accelerated apps here. For OpenCL it can be a little harder to find out which apps support the framework, Google is normally the best method.
  • Adobe After Effects CC
    • CUDA Support
      • 3D ray tracing
      • Multi GPU support
    • OpenCL Support
      • No specifics stated
  • Adobe Photoshop CC
    • CUDA Support
      • 30 effects in Mercury Graphics Engine
    • OpenCL Support
      • No specifics stated
  • Adobe Premiere Pro CC
    • CUDA Support
      • Mercury Playback Engine for real-time video editing & accelerated rendering
    • OpenCL Support
      • No specifics stated
  • Adobe SpeedGrade CC
    • CUDA Support
      • Real-time grading and finishing
  • Autodesk Maya
    • CUDA Support
      • Increased model complexity
      • Larger scenes
    • OpenCL Support
      • Physics simulations
  • Avid Media Composer
    • CUDA Support
      • Faster video effects
      • Unique stereo 3D capabilities
  • Avid Motion Graphics
    • CUDA Support
      • Real-time rendering
  • Blackmagic DaVinci Resolve
    • CUDA Support
      • Real-time colour correction
      • Real-time de-noising
    • OpenCL Support
      • Real-time colour correction
  • Final Cut Pro X
    • OpenCL Support
      • Real-time FX editing – no need to render the timeline
      • Faster overall playback & timeline performance
      • Faster third-party effect rendering
      • No transcoding of AVCHD or other complex codecs to editable ProRes
  • RED REDCINE-X
    • CUDA Support
      • Accelerated debayering
      • Support for 2 GPUs
    • OpenCL Support
      • No specifics stated
      • Only supports 1 GPU
  • RED Giant Effects Suite
    • CUDA Support
      • Faster effects
  • RED Giant Magic Bullet Looks
    • CUDA Support
      • Faster effects
  • SONY Vegas Pro
    • CUDA Support
      • Faster video effects and encoding
    • OpenCL Support
      • No specifics stated
  • The Foundry HIERO
    • CUDA Support
      • Better interactivity
  • The Foundry NUKE & NUKEX
    • CUDA Support
      • Faster effects
  • The Foundry Mari
    • CUDA Support
      • Increased model complexity at interactive rates

Round-Up

It’s pretty clear that GPGPU is a move in the right direction for all professional users. When supported it brings huge performance benefits to apps, especially when they deal with image and video.
Right now CUDA and OpenCL are the leading GPGPU frameworks. CUDA is a closed Nvidia framework, it’s not supported in as many applications as OpenCL (support is still wide, however), but where it is integrated top quality Nvidia support ensures unparalleled performance. OpenCL is open-source and is supported in more applications than CUDA. However, support is often lacklustre and it does not currently provide the same performance boosts that CUDA tends to.
In our view, Nvidia GPUs (especially newer ones) are usually the best choice for users, built in CUDA support as well as strong OpenCL performance for when CUDA is not supported. The only situation in which we would recommend an AMD GPU to professionals is when they are exclusively using apps that support OpenCL and have no CUDA option.

No comments:

Post a Comment

Back to Top