On Mon, Jul 28, 2014 at 03:06:38PM +0200, Andreas Boll wrote:
> 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.

I've attached the above patch as debdiff.

Thanks,
Andreas.
diff -Nru clinfo-0.0.20130513/debian/changelog clinfo-0.0.20130513/debian/changelog
--- clinfo-0.0.20130513/debian/changelog	2013-05-13 19:53:04.000000000 +0200
+++ clinfo-0.0.20130513/debian/changelog	2014-07-28 14:20:13.000000000 +0200
@@ -1,3 +1,10 @@
+clinfo (0.0.20130513-1.1) UNRELEASED; urgency=medium
+
+  * Drop unused CL_DEVICE_BUILT_IN_KERNELS query, fixes clinfo output on
+    OpenCL 1.1 drivers (Closes: #721103).
+
+ -- Andreas Boll <andreas.boll....@gmail.com>  Mon, 28 Jul 2014 14:19:23 +0200
+
 clinfo (0.0.20130513-1) unstable; urgency=low
 
   * New upstream release
diff -Nru clinfo-0.0.20130513/debian/patches/fix-opencl-1.1.diff clinfo-0.0.20130513/debian/patches/fix-opencl-1.1.diff
--- clinfo-0.0.20130513/debian/patches/fix-opencl-1.1.diff	1970-01-01 01:00:00.000000000 +0100
+++ clinfo-0.0.20130513/debian/patches/fix-opencl-1.1.diff	2014-07-28 14:17:02.000000000 +0200
@@ -0,0 +1,12 @@
+--- 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
+         {
diff -Nru clinfo-0.0.20130513/debian/patches/series clinfo-0.0.20130513/debian/patches/series
--- clinfo-0.0.20130513/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ clinfo-0.0.20130513/debian/patches/series	2014-07-28 14:15:23.000000000 +0200
@@ -0,0 +1 @@
+fix-opencl-1.1.diff

Reply via email to