[Pkg-opencl-devel] [clinfo] 01/02: Don't exit on CL_DEVICE_NOT_FOUND (Closes: #767985)
Rebecca Palmer
rnpalmer-guest at moszumanska.debian.org
Thu Nov 13 10:52:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
rnpalmer-guest pushed a commit to branch master
in repository clinfo.
commit 65d9c02f297dc9428dd1710011ae713a0d271439
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date: Thu Nov 13 10:32:43 2014 +0000
Don't exit on CL_DEVICE_NOT_FOUND (Closes: #767985)
---
debian/changelog | 4 ++++
debian/patches/fix-no-devices.diff | 20 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 25 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 61b7878..8be6914 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,14 @@
clinfo (0.0.20130513-2) UNRELEASED; urgency=medium
+ [ Andreas Beckmann ]
* Set Maintainer to "Debian OpenCL Maintainers" with Simon's permission.
* Add Simon Richter and myself to Uploaders.
* Import packaging into git. Add Vcs-* URLs.
* Bump Standards-Version to 3.9.6, no changes needed.
+ [ Rebecca N. Palmer ]
+ * Don't exit on CL_DEVICE_NOT_FOUND (Closes: #767985)
+
-- Andreas Beckmann <anbe at debian.org> Mon, 10 Nov 2014 00:13:07 +0100
clinfo (0.0.20130513-1.1) unstable; urgency=medium
diff --git a/debian/patches/fix-no-devices.diff b/debian/patches/fix-no-devices.diff
new file mode 100644
index 0000000..7f3e8a1
--- /dev/null
+++ b/debian/patches/fix-no-devices.diff
@@ -0,0 +1,20 @@
+Description: Don't error out on CL_DEVICE_NOT_FOUND
+
+If an ICD is installed on hardware it doesn't support, it will
+return CL_DEVICE_NOT_FOUND and 0 devices.
+This is expected behaviour, and should not be a fatal error.
+
+Author: Rebecca Palmer <rebecca_palmer at zoho.com>
+Bug-Debian: https://bugs.debian.org/767985
+
+--- clinfo-0.0.20130513.orig/platform.cpp
++++ clinfo-0.0.20130513/platform.cpp
+@@ -38,6 +38,8 @@ void platform::load()
+
+ cl_uint num_device_ids;
+ cl_int rc = clGetDeviceIDs(id, CL_DEVICE_TYPE_ALL, 0, 0, &num_device_ids);
++ if(rc == CL_DEVICE_NOT_FOUND)
++ return;
+ if(rc != CL_SUCCESS)
+ throw rc;
+
diff --git a/debian/patches/series b/debian/patches/series
index 8028318..5124ac9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
fix-opencl-1.1.diff
+fix-no-devices.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git
More information about the Pkg-opencl-devel
mailing list