GPGPU with a hard real time OS ?

Hello everyone !

I developed a “proof of concept” for my company by using CUDA and a GTX 275. The goal was to speed up a simulation and make it work in less than 10ms. For our application, the GPGPU has been proven to be a very powerful technology because the simulation runs in less than 7ms while a quad core CPU needs almost 100ms! :teehee:

The next stage is to get CUDA work with a hard real time kernel (RTX, VxWorks, a real-time UNIX-based OS). I have absolutely no idea how to proceed. Does someone already use CUDA in a hard real time context with a hard real time OS? Do we need special drivers? Do you know a hard real time kernel which can be used easily with CUDA ?

I am also interesting in using GPUs in hard real time systems.

Jitter may happen starting up the kernel or transfer data via PCI-E.

The requirement frame rate is 5000 frame per second without missing a single frame.

This means at most 200 us of jitter is allowed.

I observed much larger jitter in current GPUs.

There is no official data for this problem.

There are only CUDA drivers for three families of operating system - Windows, Mac OS X, and Linux. Pick your poison.

Linux with the RT Preempt patch is probably your best option. I think the Montavista distribution has the RT patch by default (at least one of its flavors) in case you’re not interested in rolling your own. Of course, you could take the source for the kernel of your favorite distribution and patch it yourself. Still, even RT Preempt Linux is not a hard real time operating system-- it’s soft at best. Here’s a recent paper on RT Preempt Linux: "Real Time vs Real Fast: How to Choose.

10ms (milliseconds) is a loooooong time in a segment that would usually much rather discuss timeconstraints around 10us (microseconds)

The Linux RT_PREEMPT will be plenty good for you. The current Nvidia kernel module also has builtin RT support for the latest kernel 2.6.31.6 (and not for the older ones anymore.)

I can routinely get data in, process it on the GPU and out again in under 1ms. Say 4ms would be very relaxed … 10ms would allow you to run a full desktop environment as well.

Mandriva has a pre-patched rt-kernel in their “contributions” repository.

I am writing this after much contemplation about the risk of being bitten…by a new kindaa snake…and also others… :unsure:

CPUs are not that bad after all… Are you sure you optimized your code completely, used SIMD registers, Re-write sensitive code in assembly, register-blocking, cache-blocking etc…??? May be, you can get there without using GPUs :-)

Consider using embedded versions of Linux…