OpenGL 1.4 for general purpose programming

Hi everyone,

I had an GPU, mobile Intel® 945 Express Chipset Family supported with OpenGL version 1.4

May I know is it possible to use it to program GPU for general purpose?

I want to use it to do packet filtering for networking.
What should I do and how?

I am new to OpenGL. Anyone know this?

This is my final year project title. Help is very very appreciated. :smiley:

If you think about GPGPU or how it is called nowadays - GPU computing, I’m very sorry but you have to forget it with any Intel’s GPU.

You don’t need OpenGL for that, but preferably some other API, like CUDA or OpenCL. For CUDA you need NVIDIA GPU (at least 8xxx), but OpenCL can work on both NVIDIA and AMD/ATI GPUs (SM4+).

The alternative is to use D3D. You won’t get DirectCompute on that Intel, but it does support the full SM2 feature set (vertex shaders emulated in software and pixel shaders in hardware) so you’ll be able to do a lot of stuff on the GPU with it (and also scale up to more powerful hardware).

The Intel 945 is a very strong performer with D3D by the way, easily in the same class as a GeForce 5xxx/6xxx (it just completely sucks at OpenGL).

Do you mean GPU computing can be done on Intel GPU also? I google this toptic very long already. But very hard to find a solution.what is D3D?Can briefly explain?I need it to do my packet filtering which is for general purpose, not for graphic performance…

If you think about GPGPU or how it is called nowadays - GPU computing, I’m very sorry but you have to forget it with any Intel’s GPU.

You don’t need OpenGL for that, but preferably some other API, like CUDA or OpenCL. For CUDA you need NVIDIA GPU (at least 8xxx), but OpenCL can work on both NVIDIA and AMD/ATI GPUs (SM4+). [/QUOTE]

I know about CUDA. But I do not have a NVIDIA graphic card. It is impossible to get that just for my degree project. Is there any solution to do general purpose programming on Intel GPU? Unfortunately, my GPU cannot support openCL also. The only choice is just openGL. Any other option?

what is D3D?

Direct3D.

Is there any solution to do general purpose programming on Intel GPU? Unfortunately, my GPU cannot support openCL also. The only choice is just openGL. Any other option?

You can, but I’m not sure what you’re going to get out of it. Especially if you have to rely on Intel’s OpenGL drivers.

Even moreso when you say this:

I want to use it to do packet filtering for networking.

This is not a good task for any kind of GPGPU work. Just spawn a thread/process on the CPU.

This is my final year project title.

Then you picked a very unfortunate one. Not every programming task is best served with GPGPU. Some of them just work best on the CPU.

I want to use it to do packet filtering for networking.

This is not a good task for any kind of GPGPU work. Just spawn a thread/process on the CPU.

I just want to prove it that GPU can do task faster than CPU in packet filtering. Just simple packet filtering. Not go to deep packet inspection level. I believe that GPU can do it because of its parallel programming. But I duno how to start. So, try to seek for solution here…

This is my final year project title.

Then you picked a very unfortunate one. Not every programming task is best served with GPGPU. Some of them just work best on the CPU.

I pick this is because I feel it is very interesting and I like to explore on GPU also.

Any other opinion on this?

I just want to prove it that GPU can do task faster than CPU in packet filtering.

That’s what I’m saying; I doubt it can. Packet filtering is generally a memory-limited task. That is, most of the time, the CPU is waiting for the memory to deliver information to the cache/registers.

In order for the GPU to even address the packet information, that data has to be transferred across the PCIe bus. Which is not high bandwidth. Then, after the GPU computes what it needs to compute, it has to send its data back across the same bus.

In the same time, the CPU could have gotten what it needs from memory, done the computation, and stored the results.

Just simple packet filtering. Not go to deep packet inspection level. I believe that GPU can do it because of its parallel programming.

But arranging the data into a GPU-friendly fashion and reading the data from the GPU’s buffers will take longer than actually doing the computation on the CPU.

Packet filtering is simply not computation-intensive enough for the overhead to be relatively minimized.

So, try to seek for solution here…

Basically, if you want to do GPGPU on your current GPU, you can’t use OpenGL. Intel’s drivers are simply too poor. You pretty much have to use Direct3D. You have to put the data into a GPU-friendly format, which means either stored in a texture or stored in a vertex buffer. Then you have to write a set of shaders that will process this data into some kind of image. You will then read this image back to CPU memory and determine the result based on that.

Just simple packet filtering. Not go to deep packet inspection level. I believe that GPU can do it because of its parallel programming.

But arranging the data into a GPU-friendly fashion and reading the data from the GPU’s buffers will take longer than actually doing the computation on the CPU.

Packet filtering is simply not computation-intensive enough for the overhead to be relatively minimized.

Em…I am not sure about the speed comparison between CPU and GPU. That’s why I need to find out. I thought GPU can do task much faster than CPU due to its parallel architecture even thought its speed is lower than CPU. But it can do many simple tasks at a time concurrently compare to CPU only can do one complex task at a time.

So, try to seek for solution here…

Basically, if you want to do GPGPU on your current GPU, you can’t use OpenGL. Intel’s drivers are simply too poor. You pretty much have to use Direct3D. You have to put the data into a GPU-friendly format, which means either stored in a texture or stored in a vertex buffer. Then you have to write a set of shaders that will process this data into some kind of image. You will then read this image back to CPU memory and determine the result based on that.

Texture and vertex buffer are graphic functions?You mean I can do it with Direct3D but using the graphic functions?Is it mean I need to translate graphic term into general purpose using D3D?

You came here to ask for advice, and you do not listen ? How strange.

You came here to ask for advice, and you do not listen ? How strange.

Har?when I not listen?I just want to make thing clear for me.Got wrong?How strange?

Texture and vertex buffer are graphic functions?You mean I can do it with Direct3D but using the graphic functions?Is it mean I need to translate graphic term into general purpose using D3D?

Unless you’re using a dedicated GPGPU API (which you can’t, due to having an old GPU), like OpenCL, that’s what GPGPU is: using graphics capabilities to do non-graphics works. Since your GPU doesn’t really have any non-graphics capabilities, you have to sort of trick it into doing non-graphics work by transforming your non-graphics work into something that looks like graphics, then reading the image that results from it.

Har?when I not listen?I just want to make thing clear for me.Got wrong?How strange?

He’s saying that you asked for advice. But when you got some advice (that GPGPU for packet filtering is a waste of time) you disregarded it. Which is strange for someone who is supposedly seeking advice.

Ok…thank for your advice…

Few advices more… :slight_smile:

  1. Performances directly depends on the system you are executing your program. If you get some results on your Intel, it will be (I guess) several orders of magnitude slower then executed on CPU. Then your conclusions about slower execution on GPU will be useless, because nobody would try to execute something like that on Intel’s GPUs. But if you have some GTX4xx, for example, it will be much much faster. For example, I got much slower execution on 8600M GT than on T8100 CPU using CUDA. And it was just buffer downsampling, which is the task that can easily be divided into thousands of threads. Further more, buffers were already in GPU’s memory. The situation is much better on my desktop with GTX470. So it is hard to prove something with incapable hardware.

  2. Transferring data to GPU’s memory costs. Mapping resources also costs. Considering some measurements on my laptop with 8600M, it costs a lot!

I completely agree that you have chosen very interesting topic, but in order to be able to publish any useful results (and draw valid conclusions), you must have adequate hardware.