Update installation.md Added build instructions for OpenCL support.
Added instructions for getting the OpenCL ICD. Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/5380b3a9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/5380b3a9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/5380b3a9 Branch: refs/heads/master Commit: 5380b3a952accf6d9d5474088942be8411ccfbe6 Parents: 595302a Author: Tan Li Boon <[email protected]> Authored: Wed Aug 31 11:16:50 2016 +0800 Committer: Tan Li Boon <[email protected]> Committed: Wed Aug 31 11:39:16 2016 +0800 ---------------------------------------------------------------------- doc/en/docs/installation.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5380b3a9/doc/en/docs/installation.md ---------------------------------------------------------------------- diff --git a/doc/en/docs/installation.md b/doc/en/docs/installation.md index 3fb6ba9..ecf3e97 100755 --- a/doc/en/docs/installation.md +++ b/doc/en/docs/installation.md @@ -14,6 +14,7 @@ * lmdb (tested with 0.9) * cuda (tested with 6.5, 7.0 and 7.5) * cudnn (v4 and v5) +* opencl-headers and viennacl (version 1.7.1 or newer) for OpenCL support PySINGA has additional dependencies @@ -146,6 +147,28 @@ After compiling SINGA, you can run the unit tests by You can see all the testing cases with testing results. If SINGA passes all tests, then you have successfully installed SINGA. Please proceed to try the examples! +### OpenCL support (Linux) + +Install `opencl-headers` and `libviennacl-dev` (Ubuntu 16) or `viennacl` (Fedora). + +Additionally, you will need the OpenCL Installable Client Driver (ICD) for the platforms that you want to run OpenCL on. + +* For AMD and nVidia GPUs, the driver package should also install the correct OpenCL ICD. +* For Intel CPUs and/or GPUs, get the driver from the [Intel website.](https://software.intel.com/en-us/articles/opencl-drivers) Note that the drivers provided on that website only supports recent CPUs and Iris GPUs. +* For older Intel CPUs, you can use the `beignet-opencl-icd` package. + +Note that running OpenCL on CPUs is not currently recommended because it is slow. Memory transfer is on the order of whole seconds (1000's of ms on CPUs as compared to 1's of ms on GPUs). + +More information on setting up a working OpenCL environment may be found [here](https://wiki.tiker.net/OpenCLHowTo). + +If the package version of ViennaCL is not at least 1.7.1, you will need to build it from source: + +Clone [the repository from here](https://github.com/viennacl/viennacl-dev), checkout the `release-1.7.1` tag and build it. +Remember to add its directory to `PATH` and the built libraries to `LD_LIBRARY_PATH`. + +To build SINGA with OpenCL support, you need to pass the flag during cmake: + + cmake .. -DUSE_OPENCL=ON ### Windows To be added.
