# OpenCL
OpenCL is a cross-platform interface to compute devices.
# 1 Implementations
# 1.1 PoCL
PoCL is an implementation of OpenCL for CPU devices based on LLVM.
# 1.2 rusticl
Mesa rusticl is an implementation of OpenCL for GPU devices based on LLVM.
Support for double precision is “experimental”,
enable it by setting the environment variable RUSTICL_FEATURES=fp64.
# 1.3 PoCL vs rusticl
Unfortunately (at least on Debian Trixie), using both PoCL and rusticl at the same time causes crashes, possibly because both are based on LLVM and LLVM’s internal state gets confused. Might be exacerbated if different LLVM versions are used.
Make sure only one of pocl.icd and rusticl.icd
is present in /etc/OpenCL/vendors
(you can rename pocl.icd to pocl.icd.disabled, for example).
# 2 Benchmarks
# 2.1 Fraktaler-3
Using fraktaler-3 wisdom benchmark:
| machine | backend | float | double | floatexp | doubleexp | softfloat | long double | float128 | notes |
|---|---|---|---|---|---|---|---|---|---|
| decaf | CPU | 19.58 | 19.83 | 12.99 | 13.06 | 13.32 | 16.69 | 14.15 | long double is x87 |
| “ | PoCL | 19.25 | 19.62 | 14.84 | 14.63 | 15.06 | - | - | |
| “ | rusticl | 20.66 | 19.56 | 18.75 | 17.05 | - | - | - | |
| tallat | CPU | 11.51 | 11.46 | 5.52 | 5.33 | 5.88 | 9.51 | 5.71 | long double is x87 |
| “ | PoCL | 10.60 | 10.90 | 7.48 | 7.47 | 7.22 | - | - | |
| phone cat | CPU | 16.40 | 16.22 | 10.72 | 10.75 | 11.41 | 10.15 | - | long double is float128 |
| phone uk | CPU | 10.76 | 10.73 | 7.45 | 7.27 | 7.87 | 10.84 | - | long double is double |
Higher is better, increase of 1 unit means 2 times faster.