[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: on detecting OpenCL compute capability



On 07/08/15 13:07, Gert Wollny wrote:
Hello Ghislain,


On Fri, 2015-08-07 at 12:34 +0100, Ghislain Vaillant wrote:
I have been packaging a few OpenCL libraries lately. For most of them,
the test suite can only be run from an OpenCL capable machine.

Since OpenCL can also run on the CPU it should be possible to get the
capability by pulling in a package that provides an CPU based
opencl-idc, e.g. pocl-opencl-icd.


You are correct. I guess *any* -icd package should do if we want to remain generic enough?


On amd64 and kfreebsd-amd64 this package is available in sid, on the
other archs there are some build problems.


Good to know, thanks for the heads-up

How about using the clinfo utility for this purpose? Has anyone tried
detecting OpenCL compute capability with it?

Since clinfo prints out the number of devices this should easily be
possible.


This expression gives me the number of platforms:
clinfo | head -n1 | sed -e 's/.*[^0-9]\([0-9]\+\)[^0-9]*$/\1/'

How do I create the override_dh_auto_test out of this?

I apologize in advance for my modest bash skills.

Ghis


Reply to: