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

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

    Problem is, clProgram only sees 1 gpu (clProgram.devices() returns 1). Documentation says:
    @bool QCLProgram::build ( const QList<QCLDevice> & devices, const QString & options = QString() )
    /If devices is not empty, the program will only be built for devices in the specified list.
    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.