Results 1 to 4 of 4

Thread: Coding : opencl information when program starts ....

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    3

    Coding : opencl information when program starts ....

    Hi,

    I have developped an small program using OpenCl. I know the user has to have Opencl drivers installed on his machine depending his graphic card. I have two questions :

    1) I would like to developp a method (C++ or C) that will inform if Opencl can be supported in the machine. This information has to be done even when none driver is installed.
    This would be useful to inform the user if he has to let down or download the latest drivers for his platform.

    2) As my program asks opencl.dll on startup if not present, I've included a default opencl.dll file taken from my nvidia cards driver.
    Is there another solution (other than GetProcAddress(...) ) to avoid opencl.dll message box as my program has to start even if openCl isn't supported ?

    Thank you

    Thomas

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: Coding : opencl information when program starts ....

    You can load any library dynamically using dlopen() on unix-like systems or LoadLibrary() on Windows systems.

    If loading "OpenCL.dll" dynamically fails then you know that the system does not have OpenCL installed.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    3

    Re: Coding : opencl information when program starts ....

    Hi David ,
    Thank you for your reply.
    But opencl.dll missing doesn't mean that the machine won't support opencl.
    For instance, if the user has a recent PC that can handle OpenCL but with outdated drivers, is this possible to tell him that his PC physically supports OpenCL.
    Have I to ship default opencl dll in my setup to allow this process ?

    GPU Caps viewer for instance allows to detect openCL capabilities even if no drivers installed (I think).

    Thank you,
    Regards,

  4. #4
    Member
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    55

    Re: Coding : opencl information when program starts ....

    I'd imagine you'd have to query the hardware and lookup in a table.

    Get(GPUDeviceName)
    If(GPUDeviceName == SomethingInMyDatabase)
    Tell User to Get Newer Drivers; point in the right direction

    etc.

    Of course this requires that your program be updated along with newer hardware. You'd have to do GPU and CPU, too. And if you wanted to do linux and windows, you'd have to do it differently, I'd imagine.

    I suppose you could also query the driver version, but that's probably even more messy than querying the hardware. I'm not sure if OpenCL itself is of any help here, other than possibly trying to load the DLL and prevent having to go through the above steps.

    Note: I've not tried doing anything like this before, so I could be completely wrong, but I don't forsee any 'easy' ways to do this.

Similar Threads

  1. My first openCL program
    By crtransient in forum OpenCL
    Replies: 2
    Last Post: 05-05-2010, 05:53 PM
  2. OpenGL ES 1.1 Coding Challenge offically starts
    By khronos in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 09-20-2004, 09:21 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
  •