1LIBOPENCL(7)                                                      LIBOPENCL(7)
2
3
4

NAME

6       libOpenCL, libOpenCL.so - OCL-ICD implementation of OpenCL ICD loader
7

DESCRIPTION

9       libOpenCL.so is the library linked by OpenCL programs. It does not
10       contains any OpenCL implementation itself, but merely act as a
11       dispatcher to real OpenCL implementations provided as OpenCL
12       Installable Client Driver (ICD). An ICD loader should be able to load
13       ICDs provided by any vendors.
14
15       According to OpenCL specifications from Khronos (see [Khronos]), the
16       ICD Loader looks for files into /etc/OpenCL/vendors directory and, for
17       each file whose name ends with .icd, the ICD Loader loads with
18       dlopen(3) the shared library whose name is on the first line of the
19       .icd file.
20
21       Each shared library name in ".icd" files can have its path, or it can
22       be a plain filename. In the latter case, the ICD shared library will be
23       looked for into the standard dynamic library loader paths.
24

ENVIRONMENT

26       Some environment variables can be used modify the default behavior of
27       libOpenCL.
28
29       OPENCL_VENDOR_PATH
30           This variable allows one to modify the default /etc/OpenCL/vendors
31           path. It is compatible with some other ICD loaders (but not all of
32           them, as the variable is not part of the standard). Note that
33           $OCL_ICD_VENDORS (see below) is used in priority if defined and not
34           empty.
35
36       OCL_ICD_VENDORS
37           This variable allows one to change the way ICD are searched on the
38           system. Several cases are considered:
39
40            1. if $OCL_ICD_VENDORS is a directory path, then this path
41               replaces the "/etc/OpenCL/vendors" path in the standard
42               behavior: the loader will use the .icd files in this directory;
43
44            2. else, if $OCL_ICD_VENDORS ends with .icd, libOpenCL.so will
45               only load the ICD whose shared library name is wrote into the
46               specified ".icd" file;
47
48               If there is no slashes into $OCL_ICD_VENDORS, libOpenCL.so will
49               first try to use /etc/OpenCL/vendors/$OCL_ICD_VENDORS (or
50               $OPENCL_VENDOR_PATH/$OCL_ICD_VENDORS if OPENCL_VENDOR_PATH is
51               defined). If this fail or if there are shashes, it uses
52               $OCL_ICD_VENDORS (as a relative or absolute file name path).
53
54            3. else libOpenCL.so will try to load $OCL_ICD_VENDORS as the ICD
55               shared library itself (i.e. to load it directly with
56               dlopen(3)).
57
58       OPENCL_LAYERS
59           This variable allows one to specify a colon separated list of
60           layers to load, specifying their path. This support is
61           experimental.
62
63       OCL_ICD_ASSUME_ICD_EXTENSION
64           If set to an non-empty value, contrary the Khronos specification,
65           the loader will not check that the loaded ICDs declare the
66           cl_khr_icd extension. It will also use the clGetPlatformInfo from
67           the dispatch table if no such function is globally available. You
68           may need to define this environment variable if you are using not
69           (fully) compliant ICD, or if you are using the Intel ICD together
70           with optirun(1). In the latter case, a bug into the Intel ICD will
71           make the application crash.
72
73       If set to the debug value, some additional messages will be printed in
74       debug mode (see OCL_ICD_DEBUG below).
75
76       OCL_ICD_PLATFORM_SORT
77           Allows one to choose the way platforms are sorted when presented to
78           programs through clGetPlatformIDs(3). Current provided algorithms
79           are:
80
81devices: first, list platforms that support most GPU, then most
82               CPU then most accelerators. If OCL_ICD_PLATFORM_SORT is not set
83               or set to an unknown value, this algorithm is used.
84
85none: no sort is done and the order can change at each run.
86
87       OCL_ICD_DEFAULT_PLATFORM
88           Number of the platform to choose as default platform. Note that
89           using this environment variable without ensuring the use of a sort
90           algorithm for platforms is not really useful.
91
92       OCL_ICD_DEBUG
93           If ocl-icd has been compiled with debug support, you can set this
94           environment variable to a value where each bit display some kind of
95           informations. Defined values are:
96
971: warnings (enabled by default if debug support is present and
98               OCL_ICD_DEBUG is not set)
99
1002: informative messages
101
1024: entering/exiting for some OpenCL functions
103
1048: dump of the internal structure of loaded ICDs
105
106           OCL_ICD_DEBUG is mainly useful for ocl-icd development itself
107           and/or for ICD development.
108

SEE ALSO

110       Khronos OpenCL registry website
111

AUTHOR

113       Vincent Danjean <Vincent.Danjean@ens-lyon.org>
114           Author.
115
116
117
118                                  2015-06-08                      LIBOPENCL(7)
Impressum