tags 721103 + patch
thanks
On Wed, Aug 28, 2013 at 04:18:39AM +0400, Alexander Maly wrote:
> Package: clinfo
> Version: 0.0.20130513-1
> Severity: important
>
> Dear Maintainer,
> when nvidia opencl installed (GTX-560Ti), clinfo crashes with
> uninformative E: -30
> It is because nvidia opencl driver is of version 1.1 and does not
> know about CL_DEVICE_BUILT_IN_KERNELS, so it returns error -30, and
> method query in device.cpp throws an exception.
> The result is anyway never used (nor printed), so it is possible
> to remove that query at all from device::load. Though it would be much
> better to make clinfo more user-friendly, that is, for unknown string
> parameters to return a string like "N/A" or "(null)", and for integer
> parameters to have some error values.
> Or maybe query should return a status, so unknown parameters would
> not be printed at all, and we won't have to use exceptions. Anyway, it
> is too unusual to get no results at all because of absence of one
> single element.
>
mesa-opencl-icd supports so far only OpenCL 1.1 and is also affected
by this bug.
amd-clinfo and clinfo from https://github.com/Oblomov/clinfo work fine.
As mentioned above removing the query CL_DEVICE_BUILT_IN_KERNELS fixed
the crash.
I've attached a patch to fix clinfo for OpenCL 1.1 drivers.
Please apply this patch.
Thanks,
Andreas.
--- a/device.cpp
+++ b/device.cpp
@@ -49,7 +49,8 @@
{
query(address_bits, CL_DEVICE_ADDRESS_BITS);
query(available, CL_DEVICE_AVAILABLE);
- query(built_in_kernels, CL_DEVICE_BUILT_IN_KERNELS);
+ // FIXME check for OpenCL 1.2
+ // query(built_in_kernels, CL_DEVICE_BUILT_IN_KERNELS);
query(compiler_available, CL_DEVICE_COMPILER_AVAILABLE);
try
{