cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jiapei100
Adept I

Entry-level questions on some term relationships?

 

 

Hi, all:

 

A very entry-level question:

 

1) What is the relationship between CG and CUDA?

2) What is the relationship between GPU and OpenCL?

3) What is the relationship between OpenCL and OpenGL?

4) What is ATI Stream SDK for? Is it corresponding to NVidia's CUDA?

 

Sorry, so many fundamental questions. Expecting your detailed explanation.

 

Best Regards

Pei



0 Likes
4 Replies
bubu
Adept II

>1) What is the relationship between CG and CUDA?

I assume GC = MacOSX's Grand Central Dispatch.

GC is just a multithreaded CPU library, like TBB or OpenMP.

CUDA is a massively parallel library for NVIDIA's GPUs.

 

 

>2) What is the relationship between GPU and OpenCL?

OpenCL can use the massively parallel architecture of the GPUs but also can utilize the CPU. Who will win in terms of performance heavily depends on your algorithms and optimizations.

 

 

>3) What is the relationship between OpenCL and OpenGL?

OpenGL is a graphics API, OpenCL is a GPGPU API. OpenCL can access OpenGL textures, images and buffers ( aka "GL interop" ).

 

 

>4) What is ATI Stream SDK for? Is it corresponding to NVidia's CUDA?

Originally, the Stream SDK was a close-to-metal low-level API. Then evolved into the more high-level and standarized OpenCL implementation from AMD called "AMD APP SDK". So yep, it's more or less the AMD's version of CUDA, although CUDA has more features currently ( like C++ support, etc... )

 

 

0 Likes

Hi, bubu:

First, thank you so much for your very kind and detailed explanation. I'm now much much much clearer than before. Thank you again !!

Originally posted by: bubu >1) What is the relationship between CG and CUDA?

 

I assume GC = MacOSX's Grand Central Dispatch.

 

GC is just a multithreaded CPU library, like TBB or OpenMP.

 

CUDA is a massively parallel library for NVIDIA's GPUs.

 

CG can be found at http://developer.nvidia.com/cg-toolkit 

Cuda can be found at http://developer.nvidia.com/cuda-toolkit-40

it's CG, rather than GC. 

By the way, I'd love to ask, does CG only work for NVidia, but not work for ATI video card?

 

 

 

>2) What is the relationship between GPU and OpenCL?

 

OpenCL can use the massively parallel architecture of the GPUs but also can utilize the CPU. Who will win in terms of performance heavily depends on your algorithms and optimizations. 

 

>3) What is the relationship between OpenCL and OpenGL?

 

OpenGL is a graphics API, OpenCL is a GPGPU API. OpenCL can access OpenGL textures, images and buffers ( aka "GL interop" ).

 

Thank you so much. !!  I think 2) and 3) are clearly answered !!! 

 

 

 

 

>4) What is ATI Stream SDK for? Is it corresponding to NVidia's CUDA?

 

Originally, the Stream SDK was a close-to-metal low-level API. Then evolved into the more high-level and standarized OpenCL implementation from AMD called "AMD APP SDK". So yep, it's more or less the AMD's version of CUDA, although CUDA has more features currently ( like C++ support, etc... )



 

 

Do you mean, current AMD APP SDK is still C support, instead of C++ support??

 

Thanks again.

Pei

 

 

 

0 Likes

Cg was the inception of DirectX's HLSL ( high-level shading language ) or OpenCL's GLSL. Originally DirectX's shaders were coded using a kind of assembly instructions like add, sub, mul and registers. Then NVIDIA thought shaders would be much easier to code using a higher-level language with some build-in structures like float4 and a syntax closer to the C language. That's why its name "C for graphics".

Cg may work with ATI cards, but you'll need to use some tricks. Better use an NVIDIA card because it's an NVIDIA-propietary API so ... you know...

 

Do you mean, current AMD APP SDK is still C support, instead of C++ support??


The current OpenCL spec 1.1 does not support C++ ( templates, polymorphism, STL, etc... ) and neither dynamic memory allocation ( malloc/free/new/delete ) inside the kernel. CUDA 4 supports all that and much more ... but it's NVIDIA-only 

 

0 Likes

 

Hi, bubu:

 

Thank you so much for your very very clear reply. May I have the pleasure to have your contact? 

 

Rgds

Pei

0 Likes