Results 1 to 5 of 5

Thread: Devices and command queues

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    5

    Devices and command queues

    Some examples I've seen simply use the first device returned by clGetContextInfo with CL_CONTEXT_DEVICES. This is obviously fine for single-GPU systems, but what happens on multi-GPU systems? Will all but one GPU sit idle, or does OpenCL spread the load to all devices even if there aren't any command queues created for them? What is the right way to make sure a program scales well from single to multiple GPUs (devices)?

  2. #2
    Junior Member
    Join Date
    Jan 2010
    Location
    California
    Posts
    6

    Re: Devices and command queues

    You've got it right, I believe. Only devices for which you've created command queues and assigned some work will be used; the runtime doesn't do any sort of automatic load balancing.

    As to the "right way" to ensure scalability, I can only offer the truly sucky "It depends on your problem." Keep in mind that you'll have to either copy all the data for your problem to each card, or split the data up on the CPU based on the number of cards you're working with. Combining results is your job as well.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    5

    Re: Devices and command queues

    Thanks, that cleared things up a bit.

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Posts
    1

    Re: Devices and command queues

    And how do multi GPU cards like some high end GeForce 2xx into play? Do the GPUs share the memory (I suppose they should). Do they appear as different devices, or as one compute device?

  5. #5
    Junior Member
    Join Date
    Jan 2010
    Location
    California
    Posts
    6

    Re: Devices and command queues

    I think that these cards (like the GTX295) just show up as two devices with two separate memories. So from the perspective of the OpenCL runtime, it's no different than just chucking two physically separate cards in the machine.

Similar Threads

  1. Replies: 4
    Last Post: 11-24-2011, 06:15 AM
  2. Replies: 3
    Last Post: 12-08-2009, 10:29 AM

Posting Permissions

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