Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Multiple GPUs with QtOpenCL
Qt 6.11 is out! See what's new in the release blog

Multiple GPUs with QtOpenCL

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    atlemann
    wrote on last edited by
    #1

    Hi!

    I am currently developing an application using QtOpenCL on a machine with 4 GPUs. These GPUs are currently working individually in a master/worker fashion, but later I want them to work together by exchanging ghost layers in a large matrix. I use QRunnables for creating tasks and for filling the command queue for the first available GPU.

    Using multiple devices is sort of tricky when using QtOpenCL, since a context has a default command queue which is used for queueing kernels and such. But I need 4 command queues, one for each GPU. What I ended up with was creating one context per GPU with a command queue with one of the devices only. Is this the way it's supposed to be done?

    The NVIDIA examples just created multiple command queues in a single context, but for the C-API the command queue is an input to the OpenCL calls, which makes how to do it obvious.

    Sincerely
    Atle

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved