Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: OpenGL 1.4 for general purpose programming

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2010
    Posts
    115

    OpenGL 1.4 for general purpose programming

    Hi everyone,

    I had an GPU, mobile Intel(R) 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.

  2. #2
    Advanced Member Frequent Contributor Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    949

    Re: OpenGL 1.4 for general purpose programming

    Quote Originally Posted by SagoO
    May I know is it possible to use it to program GPU for general purpose?
    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.

    Quote Originally Posted by SagoO
    I am new to OpenGL. Anyone know this?
    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+).

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Jan 2007
    Posts
    965

    Re: OpenGL 1.4 for general purpose programming

    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).

  4. #4
    Junior Member Regular Contributor
    Join Date
    Aug 2010
    Posts
    115

    Re: OpenGL 1.4 for general purpose programming

    Quote Originally Posted by mhagain
    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..

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2010
    Posts
    115

    Re: OpenGL 1.4 for general purpose programming

    Quote Originally Posted by Aleksandar
    Quote Originally Posted by SagoO
    May I know is it possible to use it to program GPU for general purpose?
    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.

    Quote Originally Posted by SagoO
    I am new to OpenGL. Anyone know this?
    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+).
    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?

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,732

    Re: OpenGL 1.4 for general purpose programming

    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.

  7. #7
    Junior Member Regular Contributor
    Join Date
    Aug 2010
    Posts
    115

    Re: OpenGL 1.4 for general purpose programming

    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?

  8. #8
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,732

    Re: OpenGL 1.4 for general purpose programming

    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.

  9. #9
    Junior Member Regular Contributor
    Join Date
    Aug 2010
    Posts
    115

    Re: OpenGL 1.4 for general purpose programming

    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?

  10. #10
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: OpenGL 1.4 for general purpose programming

    Quote Originally Posted by SagoO
    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.
    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.
    You came here to ask for advice, and you do not listen ? How strange.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •