[Pkg-opencl-devel] [PATCH 0/6] ocl-icd: sort plaforms by number of devices

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Tue May 19 06:00:39 UTC 2015


While the first three patches of this series are just trivial cleanups,
the latter three introduce a change discussed on the Debian OpenCL
packagers mailing list, that is to sort platforms by number (and type)
of devices.

The aim is to provide an "as functional as possible" environment out of
the box to users that have a (potentially) large number of platforms
(for example, because all ICDs have been installed by the
distribution): this can result in platforms without devices being
select as "first platform" (e.g. Clover, when no Mesa-supported device
is actually available), which will cause many applications (both free
and non-free) to fail during the standard initialization procedure (get
first device of first platform).

The solution is to count the number of GPU, CPU and ALL devices of each
platform during the ICD loader initialization, and (topologically) sort
platforms by number of available devices. This will generally put
GPU-supporting platforms first, and no-device platforms last, which is
_typically_ what is intended.

Giuseppe Bilotta (6):
  Typo fix: plat[e]form
  Typos
  Whitespace cleanup
  Remove useless vendor_icd.first_platform
  Count GPU, CPU and ALL devices on newly inserted platforms
  Sort platforms by number of GPU, CPU and ALL devices

 NEWS                |   2 +-
 doc/libOpenCL.7.txt |  12 +++---
 icd_generator.rb    |   9 +++--
 ocl_icd_loader.c    | 107 ++++++++++++++++++++++++++++++++++++++--------------
 4 files changed, 91 insertions(+), 39 deletions(-)

-- 
2.1.2.766.gaa23a90




More information about the Pkg-opencl-devel mailing list