Results 1 to 9 of 9

Thread: QtConcurrent and CUDA or GPGPU

  1. #1
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QtConcurrent and CUDA or GPGPU

    Hi,

    I just read the introduction of the QtConcurrent package and I was wondering, whether there are already CUDA of GPGPU bindings available, that use all resources.

    Or is QtConcurrent "just" making use of the "normal" cpus ?

    Thanks,
    Olli

  2. The following user says thank you to olidem for this useful post:

    Phlucious (27th February 2013)

  3. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: QtConcurrent and CUDA or GPGPU

    It is just making use of normal CPUs. It is a framework to let jobs be processed by some threads and get informed about the results.
    It's nice to be important but it's more important to be nice.

  4. #3
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QtConcurrent and CUDA or GPGPU

    It is just making use of normal CPUs. It is a framework to let jobs be processed by some threads and get informed about the results.
    Yes, that is true. You cannot make use of QtConcurrent here because a few people requires to run threads on GPU and as far as I know you need to look into OpenCL.

    Best wishes.

  5. #4
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtConcurrent and CUDA or GPGPU

    Well, but doesn't it suggest itself to think of cuda bindings for QtConcurrent? Is it due to (L)GPL restrictions that this isn't done, or am I missing something here?

    Ok, usually such cuda programs are highly optimised for the cuda architecture they are run on. But I can imagine general rules how one could at least set up some general rules for the translation of those qtconcurrent operations to the gpu.

    Please correct me if i am wrong.

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtConcurrent and CUDA or GPGPU

    Quote Originally Posted by olidem View Post
    Well, but doesn't it suggest itself to think of cuda bindings for QtConcurrent? Is it due to (L)GPL restrictions that this isn't done, or am I missing something here?
    CUDA is pseudo-C, QtConcurrent is C++. CUDA requires data to be setup in a very specific way, execution is groupped into blocks, etc. It just doesn't fit into what QtConcurrent does.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #6
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: QtConcurrent and CUDA or GPGPU

    A Qt programm is written in C++. So is the code written in C++ that the QtConcurrent jobs run. The programm is then compiled to run on the host CPU architecture.

    If you want to use CUDA, you have at least to compile the program again for the GPU. This implies that there is infrastructure to do so. Currently there is no such infrastructure in Qt. I think it could be done but it is not so easy that you could do it in 30 minutes as long as the license would permit it.
    It's nice to be important but it's more important to be nice.

  8. #7
    Join Date
    Feb 2009
    Posts
    79
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtConcurrent and CUDA or GPGPU

    Yes, of course! I never said, it could be done in one day.

    But, for me this is really an interesting topic and perspective for the coming years. And I do not want to restrict this idea just to cuda. There are several other techniques and languages out there being really promising, eg. as already mentioned OpenCL.

    Perhaps this could be another direction the development of Qt go into. I am quite sure that there are a lot of people out there searching for one "standard" way how to port their code to such gpus and not wanting to develop 1 month for each architecture.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtConcurrent and CUDA or GPGPU

    In my opinion there is not much here that Qt could improve in the subject. OpenCL is portable so you can use it directly. Providing a Qt wrapper over a C++ interface would probably be a waste of time.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. The following user says thank you to wysota for this useful post:

    Phlucious (27th February 2013)

  11. #9
    Join Date
    Jan 2011
    Posts
    70
    Thanks
    43
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtConcurrent and CUDA or GPGPU

    Yes, this is an old thread, but a new search brought me here and there's been an update along these lines. Looks like someone's been working on integrating Qt with OpenCL to accomplish what the OP is talking about.

    http://blog.qt.digia.com/blog/2010/0...pencl-with-qt/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.