Your message dated Mon, 26 May 2014 11:53:00 +0000
with message-id <[email protected]>
and subject line Bug#748785: Removed package(s) from unstable
has caused the Debian Bug report #745456,
regarding create_some_context() can fail if multiple ICDs installed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
745456: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745456
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: pyopencl
Version: 2013.2-1
Tags: patch

In non-interactive mode, create_some_context currently always
chooses the first device of the first platform.  This fails if
this has no devices (eg. it is the wrong one for the available
hardware), and will be slow if if is the CPU.

This patch makes it search through the platforms for a device,
preferring a GPU if available. As discussed earlier, this will allow making OpenCL just work (at least for hardware that has a free ICD) by defaulting to installing all ICDs.

This requires the "Make get_devices() return an empty list instead of erroring out" fix you just sent upstream.
Description: Don't fail if the first platform has no devices

In non-interactive mode, create_some_context currently always
chooses the first device of the first platform.  This fails if
this has no devices (eg. it is the wrong one for the available
hardware), and will be slow if if is the CPU.

This patch makes it search through the platforms for a device,
preferring a GPU if available.

Author: Rebecca Palmer
Forwarded: no

--- pyopencl-2013.2.orig/pyopencl/__init__.py
+++ pyopencl-2013.2/pyopencl/__init__.py
@@ -776,9 +776,22 @@ def create_some_context(interactive=True
             for i, pf in enumerate(platforms):
                 cc_print("[%d] %s" % (i, pf))
 
-        answer = get_input("Choice [0]:")
+        answer = get_input("Choice:")
         if not answer:
-            platform = platforms[0]
+            for pf in platforms:
+                devices = pf.get_devices(device_type=device_type.GPU)
+                if devices:
+                    platform = pf
+                    default_device = devices[0]
+                    break
+            if not devices: # No GPUs found
+                for pf in platforms:
+                    devices = pf.get_devices()
+                    if devices:
+                        platform = pf
+                        default_device = devices[0]
+                        break
+
         else:
             platform = None
             try:
@@ -828,9 +841,9 @@ def create_some_context(interactive=True
             for i, dev in enumerate(devices):
                 cc_print("[%d] %s" % (i, dev))
 
-        answer = get_input("Choice, comma-separated [0]:")
+        answer = get_input("Choice, comma-separated:")
         if not answer:
-            devices = [devices[0]]
+            devices = [default_device]
         else:
             devices = [parse_device(i) for i in answer.split(",")]
 

--- End Message ---
--- Begin Message ---
Version: 2013.2-1+rm

Dear submitter,

as the package pyopencl has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/748785

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to