Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to run CUDA on AMD GPUs?

I'd like to extend my skill set into GPU computing. I am familiar with raytracing and realtime graphics(OpenGL), but the next generation of graphics and high performance computing seems to be in GPU computing or something like it.

I currently use an AMD HD 7870 graphics card on my home computer. Could I write CUDA code for this? (my intuition is no, but since Nvidia released the compiler binaries I might be wrong).

A second more general question is, Where do I start with GPU computing? I'm certain this is an often asked question, but the best I saw was from 08' and I figure the field has changed quite a bit since then.

like image 520
Lee Jacobs Avatar asked Oct 10 '12 21:10

Lee Jacobs


People also ask

Do AMD GPUs have CUDA cores?

Do AMD cards have CUDA Cores? No. CUDA Cores are a proprietary technology developed by NVIDIA that's only available in NVIDIA GPUs.

Can you run CUDA on non Nvidia GPU?

Unfortunately, you cannot use CUDA without a Nvidia Graphics Card. CUDA is a framework developed by Nvidia that allows people with a Nvidia Graphics Card to use GPU acceleration when it comes to deep learning, and not having a Nvidia graphics card defeats that purpose.

Does AMD have a CUDA equivalent?

The analog of the CUDA driver API on the AMD platform is OpenCL.

What GPUs can run CUDA?

CUDA works with all Nvidia GPUs from the G8x series onwards, including GeForce, Quadro and the Tesla line. CUDA is compatible with most standard operating systems.


2 Answers

Nope, you can't use CUDA for that. CUDA is limited to NVIDIA hardware. OpenCL would be the best alternative.

Khronos itself has a list of resources. As does the StreamComputing.eu website. For your AMD specific resources, you might want to have a look at AMD's APP SDK page.

Note that at this time there are several initiatives to translate/cross-compile CUDA to different languages and APIs. One such an example is HIP. Note however that this still does not mean that CUDA runs on AMD GPUs.

like image 68
Bart Avatar answered Sep 20 '22 06:09

Bart


You can run NVIDIA® CUDA™ code on Mac, and indeed on OpenCL 1.2 GPUs in general, using Coriander . Disclosure: I'm the author. Example usage:

cocl cuda_sample.cu ./cuda_sample 

Result: enter image description here

like image 22
Hugh Perkins Avatar answered Sep 19 '22 06:09

Hugh Perkins