Handmade Network»Forums
Shazan Shums
159 posts
Some day I will make quality software. Programming FTW.
GPGPU - for non graphics apps
Is using GPU for non graphics intense apps worth like database related apps for use in integrated gpu containing laptops.
Marc Costa
65 posts
GPGPU - for non graphics apps
GPGPU is literally using the GPU for General Programming (i.e. non graphics work) :)

In terms of application, they're used in areas where high levels of parallelism, higher memory throughput and compute power are going to give an advantage over low parallelism / deep pipelined CPUs. I guess databases are not in these areas, since they're probably limited by storage size (both HDD & RAM), of which GPUs have even less, and memory latency.

Here's an idea of some of the problems better suited for GPUs.
Timothy Wright
76 posts / 1 project
GPGPU - for non graphics apps
I am currently processing research data with the GPU. The original algorithm took about 45 minutes to do the calculations. We optimized it down to about 2 minutes with caches and things.

Then I moved it over to the GPU with OpenGL compute shaders and go it down to 9 seconds. This can be a lot faster with a high-end card, but I only have a crappy one with a linux driver.

The main problem with using this for regular algorithms with the huge amount of time it takes to get the data into the GPU and to get the data out. In my case it's a small amount of data and a large amount of math. Given the complexity of debugging it and the lack of consistency between computers, it still isn't practical for regular stuff.
511 posts
GPGPU - for non graphics apps
timothy.wright
I am currently processing research data with the GPU. The original algorithm took about 45 minutes to do the calculations. We optimized it down to about 2 minutes with caches and things.

Then I moved it over to the GPU with OpenGL compute shaders and go it down to 9 seconds. This can be a lot faster with a high-end card, but I only have a crappy one with a linux driver.

The main problem with using this for regular algorithms with the huge amount of time it takes to get the data into the GPU and to get the data out. In my case it's a small amount of data and a large amount of math. Given the complexity of debugging it and the lack of consistency between computers, it still isn't practical for regular stuff.


the bandwidth over the PCIe bus (what connects the GPU and RAM) is on the order of 20 GB/s.

Bottleneck with database application is more likely the harddrive whose Sata connection is on the order of 2 GB/s.

This is still a lot of data that can be moved around per time unit. Though managing the in-RAM and on GPU cache will become important.
Shazan Shums
159 posts
Some day I will make quality software. Programming FTW.
GPGPU - for non graphics apps
Edited by Shazan Shums on
I was thinking is it better to use opengl or opencl. Is there a difference. Or should i use SIMD instead.
Mārtiņš Možeiko
2562 posts / 2 projects
GPGPU - for non graphics apps
Edited by Mārtiņš Možeiko on
There is a difference. OpenGL exposes a bit more graphics related functionality which OpenCL doesn't have access to. But OpenCL has nicer API which is easier to use when doing compute-only work. Latest OpenGL versions have also compute shaders which can be easily used for arbitrary computations, although you'll still need to some crazy glue code for setting up context & stuff. If you target only Windows then DirectCompute is also an option.

And CPU SIMD is completely on different level.