Cuda hardware Vs. Opengl/Directx hardware

Hello everyone,

I’d like to know the relation between the hardware used by GPGPU and the hardware used by Directx/OpenGL applications.
I mean, they are just different languages/concepts for the same hardware or each one has their own area on the graphics card (perhaps with a intersection)?

This is a common question when I’m explaining to someone about CUDA technology and I couldn’t find the answer in the internet.

Thank you.

The line is blurry between hardware that supports GPGPU and hardware that supports OpenGL/DirectX. In most cases it is possible to emulate features from one on the other. For example, CUDA provides an abstraction of a flat global address space that is byte addressable where OpenGL works with buffers that have restrictions on pointer operations and are accessed with different alignment restrictions depending on the type of buffer. It is possible to emulate CUDA on hardware that does not have support for loads to arbitrary pointers using pointer analysis to determine which buffer a pointer is likely to point to and loading from it by name and offset. There are many examples like this.

They usually have the same area on the card. However, if some of the GPU hardware is designed with GPGPU in mind, it may have a performance advantage when executing GPGPU workloads and be more straightforward to write a compiler for.

I wouldn’t say the line is blurry - a lot of the hardware is shared. Vertex, geometry and pixel shaders are all executed using the same SMs that run CUDA programs. There is a small amount of hardware (interpolation, rasterization, raster ops) that is not used by CUDA.