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.
61
62       OPENCL_LAYER_PATH
63           This variable allows one to override the default system layer
64           search path (/etc/OpenCL/layers).
65
66       OCL_ICD_ASSUME_ICD_EXTENSION
67           If set to an non-empty value, contrary the Khronos specification,
68           the loader will not check that the loaded ICDs declare the
69           cl_khr_icd extension. It will also use the clGetPlatformInfo from
70           the dispatch table if no such function is globally available. You
71           may need to define this environment variable if you are using not
72           (fully) compliant ICD, or if you are using the Intel ICD together
73           with optirun(1). In the latter case, a bug into the Intel ICD will
74           make the application crash.
75
76       If set to the debug value, some additional messages will be printed in
77       debug mode (see OCL_ICD_DEBUG below).
78
79       OCL_ICD_PLATFORM_SORT
80           Allows one to choose the way platforms are sorted when presented to
81           programs through clGetPlatformIDs(3). Current provided algorithms
82           are:
83
84devices: first, list platforms that support most GPU, then most
85               CPU then most accelerators. If OCL_ICD_PLATFORM_SORT is not set
86               or set to an unknown value, this algorithm is used.
87
88none: no sort is done and the order can change at each run.
89
90       OCL_ICD_DEFAULT_PLATFORM
91           Number of the platform to choose as default platform. Note that
92           using this environment variable without ensuring the use of a sort
93           algorithm for platforms is not really useful.
94
95       OCL_ICD_DEBUG
96           If ocl-icd has been compiled with debug support, you can set this
97           environment variable to a value where each bit display some kind of
98           informations. Defined values are:
99
1001: warnings (enabled by default if debug support is present and
101               OCL_ICD_DEBUG is not set)
102
1032: informative messages
104
1054: entering/exiting for some OpenCL functions
106
1078: dump of the internal structure of loaded ICDs
108
109           OCL_ICD_DEBUG is mainly useful for ocl-icd development itself
110           and/or for ICD development.
111

SEE ALSO

113       Khronos OpenCL registry website
114

AUTHOR

116       Vincent Danjean <Vincent.Danjean@ens-lyon.org>
117           Author.
118
119
120
121                                  2015-06-08                      LIBOPENCL(7)
Impressum