This library provides 2D [convolutions] accelerated with [OpenCL]. Convolutions are particularly useful for deep learning tasks, such as image recognition; they are a basic building block for convolutional neural networks.
The library is intended mostly for quick-and-dirty hacking in deep learning research, in which one needs a separate spatial convolution primitive. Note that full-scale DL frameworks (TensorFlow, PyTorch, etc.) will most probably be a more robust and scalable tool for more high-level tasks.
See crate docs for the examples of usage.
OpenCL has a variety of implementations. For quick testing, one may use POCL; it is open source and not tied to hardware (at the cost of being CPU-based, i.e., orders of magnitude slower than OpenCL implementations by GPU vendors). POCL may be installed from sources with the commands like these (showcased here for Ubuntu Xenial):
```bash
apt-get install build-essential cmake pkg-config libhwloc-dev zlib1g-dev
apt-get install ocl-icd-libopencl1 ocl-icd-dev ocl-icd-opencl-dev clinfo
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main' apt-get update apt-get install clang-8 libclang-8-dev llvm-8 llvm-8-dev
export POCLVER=1.3 # latest stable version curl -sSL "https://github.com/pocl/pocl/archive/v$POCLVER.tar.gz" > pocl-$POCLVER.tar.gz tar xf "pocl-$POCLVER.tar.gz"
cd pocl-$POCLVER mkdir build && cd build cmake -DWITHLLVMCONFIG=/usr/bin/llvm-config-8 -DCMAKEINSTALL_PREFIX=/usr .. make
clinfo
clinfo
should display information about the POCL platform.```
Licensed under the Apache 2.0 license.