232 lines
6.1 KiB
HTML
232 lines
6.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of LIBOPENCL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>LIBOPENCL</H1>
|
|
Section: (7)<BR>Updated: 2015-06-08<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
libOpenCL, libOpenCL.so - OCL-ICD implementation of OpenCL ICD loader
|
|
<A NAME="lbAC"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
libOpenCL.so is the library linked by OpenCL programs. It does not contains any OpenCL implementation itself, but merly act as a dispatcher to real OpenCL implementations provided as OpenCL Installable Client Driver (ICD). An ICD loader should be able to load ICDs provided by any vendors.
|
|
<P>
|
|
According to OpenCL specifications from Khronos (see [Khronos]), the ICD Loader looks for files into <I>/etc/OpenCL/vendors</I> directory and, for each file whose name ends with <I>.icd</I>, the ICD Loader loads with <B><A HREF="/cgi-bin/man/man2html?3+dlopen">dlopen</A></B>(3) the shared library whose name is on the first line of the <I>.icd</I> file.
|
|
<P>
|
|
Each shared library name in ".icd" files can have its path, or it can be a plain filename. In the latter case, the ICD shared library will be looked for into the standard dynamic library loader paths.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<P>
|
|
Some environment variables can be used modify the default behavior of libOpenCL.
|
|
<P>
|
|
|
|
<B>OPENCL_VENDOR_PATH</B>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
This variable allows one to modify the defaut
|
|
<I>/etc/OpenCL/vendors</I>
|
|
path. It is compatible with some other ICD loaders (but not all of them, as the variable is not part of the standard). Note that
|
|
<B>$OCL_ICD_VENDORS</B>
|
|
(see below) is used in priority if defined and not empty.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>OCL_ICD_VENDORS</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
This variable allows one to change the way ICD are searched on the system. Several cases are considered:
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
1.
|
|
|
|
|
|
if
|
|
<B>$OCL_ICD_VENDORS</B>
|
|
is a directory path, then this path replaces the "/etc/OpenCL/vendors" path in the standard behavior: the loader will use the
|
|
<I>.icd</I>
|
|
files in this directory;
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
2.
|
|
|
|
|
|
else, if
|
|
<B>$OCL_ICD_VENDORS</B>
|
|
ends with
|
|
<I>.icd</I>, libOpenCL.so will only load the ICD whose shared library name is wrote into the specified ".icd" file;
|
|
<P>
|
|
If there is no slashes into
|
|
<B>$OCL_ICD_VENDORS</B>, libOpenCL.so will first try to use
|
|
<I>/etc/OpenCL/vendors</I><B>$OCL_ICD_VENDORS</B>
|
|
(or
|
|
<B>$OPENCL_VENDOR_PATH</B><I>/</I><B>$OCL_ICD_VENDORS</B>
|
|
if
|
|
<B>OPENCL_VENDOR_PATH</B>
|
|
is defined). If this fail or if there are shashes, it uses
|
|
<B>$OCL_ICD_VENDORS</B>
|
|
(as a relative or absolute file name path).
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
3.
|
|
|
|
|
|
else libOpenCL.so will try to load
|
|
<B>$OCL_ICD_VENDORS</B>
|
|
as the ICD shared library itself (i.e. to load it directly with
|
|
<B><A HREF="/cgi-bin/man/man2html?3+dlopen">dlopen</A></B>(3)).
|
|
</DL>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>OCL_ICD_ASSUME_ICD_EXTENSION</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
If set to an non-empty value, contrary the Khronos specification, the loader will not check that the loaded ICDs declare the
|
|
cl_khr_icd
|
|
extension. It will also use the clGetPlatformInfo from the dispatch table if no such function is globally available. You may need to define this environment variable if you are using not (fully) compliant ICD, or if you are using the Intel ICD together with
|
|
<B><A HREF="/cgi-bin/man/man2html?1+optirun">optirun</A></B>(1). In the latter case, a bug into the Intel ICD will make the application crash.
|
|
</DL>
|
|
|
|
<P>
|
|
If set to the <I>debug</I> value, some additional messages will be printed in debug mode (see <B>OCL_ICD_DEBUG</B> below).
|
|
<P>
|
|
|
|
<B>OCL_ICD_PLATFORM_SORT</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Allows one to choose the way platforms are sorted when presented to programs through
|
|
<B><A HREF="/cgi-bin/man/man2html?3+clGetPlatformIDs">clGetPlatformIDs</A></B>(3). Current provided algorithms are:
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
•
|
|
|
|
|
|
<B>devices</B>: first, list platforms that support most GPU, then most CPU then most accelerators. If
|
|
<B>OCL_ICD_PLATFORM_SORT</B>
|
|
is not set or set to an unknown value, this algorithm is used.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
•
|
|
|
|
|
|
<B>none</B>: no sort is done and the order can change at each run.
|
|
</DL>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>OCL_ICD_DEFAULT_PLATFORM</B>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Number of the platform to choose as defaut platform. Note that using this environment variable without ensuring the use of a sort algorithm for platforms is not really useful.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>OCL_ICD_DEBUG</B>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
If ocl-icd has been compiled with debug support, you can set this environment variable to a value where each bit display some kind of informations. Defined values are:
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
•
|
|
|
|
|
|
<B>1</B>: warnings (enabled by default if debug support is present and
|
|
<B>OCL_ICD_DEBUG</B>
|
|
is not set)
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
•
|
|
|
|
|
|
<B>2</B>: informative messages
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
•
|
|
|
|
|
|
<B>4</B>: entering/exiting for some OpenCL functions
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
•
|
|
|
|
|
|
<B>8</B>: dump of the internal structure of loaded ICDs
|
|
</DL>
|
|
|
|
<P>
|
|
<B>OCL_ICD_DEBUG</B>
|
|
is mainly useful for ocl-icd development itself and/or for ICD development.
|
|
</DL>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
<A HREF="http://www.khronos.org/registry/cl/[Khronos">http://www.khronos.org/registry/cl/[Khronos</A> OpenCL registry website]
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
<B>Vincent Danjean</B> <<A HREF="mailto:Vincent.Danjean@ens-lyon.org">Vincent.Danjean@ens-lyon.org</A>>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Author.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">ENVIRONMENT</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:09 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|