July 11, 2011

elmigranto elmigranto
Lab Rat
11 posts

Using QtOpenCL with multiple devices


I have 2 videocards (2 GPUs each) (Radeon HD 6990). I’m trying to use both of them in my calculations.
Querying AMD APP platform returns correct number of avail. OpenCL-devices, so I’m creating context with QList< QCLDevice > containing 4 GPUs.

Then I’m creating QCLProgram using QCLContext::createProgramFromSourceFile().

  1.     clContext.create(clDevices)
  2.     clProgram = clContext.createProgramFromSourceFile("test.cl");
  3.     /* setting compilier params... */
  4.     clProgram.build(clCompilierOptions)

Problem is, clProgram only sees 1 gpu (clProgram.devices() returns 1). Documentation says:

  1. bool QCLProgram::build ( const QList<QCLDevice> & devices, const QString & options = QString() )
  2. /*If devices is not empty, the program will only be built for devices in the specified list.
  3. Otherwise the program will be built for all devices on the program's context.*/

However, using QList<QCLDevice>() as first param leads to same result.

Any advices? Thanks.

0 replies

  ‹‹ [SOLVED] How to destroy widget when close QDockWidget      [SOLVED] Selecting a Tab in Code ››

You must log in to post a reply. Not a member yet? Register here!