How To Install pocl on Fedora 34

pocl is Portable Computing Language - an OpenCL implementation Portable Computing Language - an OpenCL implementation

Introduction

In this tutorial we learn how to install pocl on Fedora 34.

What is pocl

Pocl’s goal is to become an efficient open source (MIT-licensed) implementation of the OpenCL 1.2 (and soon OpenCL 2.0) standard. In addition to producing an easily portable open-source OpenCL implementation, another major goal of this project is improving performance portability of OpenCL programs with compiler optimizations, reducing the need for target-dependent manual optimizations. At the core of pocl is the kernel compiler that consists of a set of LLVM passes used to statically transform kernels into work-group functions with multiple work-items, even in the presence of work-group barriers. These functions are suitable for parallelization in multiple ways (SIMD, VLIW, superscalar,…). pocl 1.7 2.fc34 x86_64 8.0 M pocl-1.7-2.fc34.src.rpm updates Portable Computing Language - an OpenCL implementation http MIT and BSD and (GPLv3+ or LGPLv3+) Pocl’s goal is to become an efficient open source (MIT-licensed) implementation of the OpenCL 1.2 (and soon OpenCL 2.0) standard. In addition to producing an easily portable open-source OpenCL implementation, another major goal of this project is improving performance portability of OpenCL programs with compiler optimizations, reducing the need for target-dependent manual optimizations. At the core of pocl is the kernel compiler that consists of a set of LLVM passes used to statically transform kernels into work-group functions with multiple work-items, even in the presence of work-group barriers. These functions are suitable for parallelization in multiple ways (SIMD, VLIW, superscalar,…).

We can use yum or dnf to install pocl on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install pocl.

Install pocl on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install pocl using dnf by running the following command:

sudo dnf -y install pocl

Install pocl on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install pocl using yum by running the following command:

sudo yum -y install pocl

How To Uninstall pocl on Fedora 34

To uninstall only the pocl package we can use the following command:

sudo dnf remove pocl

pocl Package Contents on Fedora 34

/etc/OpenCL/vendors/pocl.icd
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/ec1fabe47d58bb0950cdbb1a2829fc4f291675
/usr/lib/.build-id/66
/usr/lib/.build-id/66/86a54593a8e18e48a9bdcd11d8542bfb0f021d
/usr/lib/.build-id/9c
/usr/lib/.build-id/9c/3a66717369891c960f9bb50c4b19615d581d1f
/usr/lib/.build-id/f0
/usr/lib/.build-id/f0/b01c68a6a285b49883f155a7e1caedf9d6e9ca
/usr/lib/libpocl.so.2
/usr/lib/libpocl.so.2.7.0
/usr/lib/pocl
/usr/lib/pocl/libllvmopencl.so
/usr/lib/pocl/libpocl-devices-basic.so
/usr/lib/pocl/libpocl-devices-pthread.so
/usr/share/doc/pocl
/usr/share/doc/pocl/README
/usr/share/doc/pocl/accel.rst
/usr/share/doc/pocl/conformance.rst
/usr/share/doc/pocl/cuda.rst
/usr/share/doc/pocl/debug.rst
/usr/share/doc/pocl/design.rst
/usr/share/doc/pocl/development.rst
/usr/share/doc/pocl/faq.rst
/usr/share/doc/pocl/features.rst
/usr/share/doc/pocl/host_library.rst
/usr/share/doc/pocl/hsa.rst
/usr/share/doc/pocl/index.rst
/usr/share/doc/pocl/install.rst
/usr/share/doc/pocl/kernel_compiler.rst
/usr/share/doc/pocl/memory_management.rst
/usr/share/doc/pocl/opencl_status.rst
/usr/share/doc/pocl/pocl_binary.rst
/usr/share/doc/pocl/using.rst
/usr/share/licenses/pocl
/usr/share/licenses/pocl/LICENSE
/usr/share/pocl
/usr/share/pocl/include
/usr/share/pocl/include/_builtin_renames.h
/usr/share/pocl/include/_clang_opencl.h
/usr/share/pocl/include/_enable_all_exts.h
/usr/share/pocl/include/_kernel.h
/usr/share/pocl/include/_kernel_c.h
/usr/share/pocl/include/_kernel_constants.h
/usr/share/pocl/include/_libclang_versions_checks.h
/usr/share/pocl/include/opencl-c-base.h
/usr/share/pocl/include/opencl-c.h
/usr/share/pocl/include/pocl.h
/usr/share/pocl/include/pocl_device.h
/usr/share/pocl/include/pocl_image_types.h
/usr/share/pocl/include/pocl_spir.h
/usr/share/pocl/include/pocl_types.h
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx2.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx512.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx_f16c.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx_fma4.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-sse2.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-sse41.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-ssse3.bc
/etc/OpenCL/vendors/pocl.icd
/usr/lib/.build-id
/usr/lib/.build-id/01
/usr/lib/.build-id/01/8350022863ff36522ab1ca6838965beaeb7557
/usr/lib/.build-id/3a
/usr/lib/.build-id/3a/e2a53ed810fa2a82e11a5ec7ab8acf335dff6e
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/8e6f90596ed73500390f514ed09cf495284521
/usr/lib/.build-id/e8/fca88d44ef709600c2474a278595050c520fb6
/usr/lib64/libpocl.so.2
/usr/lib64/libpocl.so.2.7.0
/usr/lib64/pocl
/usr/lib64/pocl/libllvmopencl.so
/usr/lib64/pocl/libpocl-devices-basic.so
/usr/lib64/pocl/libpocl-devices-pthread.so
/usr/share/doc/pocl
/usr/share/doc/pocl/README
/usr/share/doc/pocl/accel.rst
/usr/share/doc/pocl/conformance.rst
/usr/share/doc/pocl/cuda.rst
/usr/share/doc/pocl/debug.rst
/usr/share/doc/pocl/design.rst
/usr/share/doc/pocl/development.rst
/usr/share/doc/pocl/faq.rst
/usr/share/doc/pocl/features.rst
/usr/share/doc/pocl/host_library.rst
/usr/share/doc/pocl/hsa.rst
/usr/share/doc/pocl/index.rst
/usr/share/doc/pocl/install.rst
/usr/share/doc/pocl/kernel_compiler.rst
/usr/share/doc/pocl/memory_management.rst
/usr/share/doc/pocl/opencl_status.rst
/usr/share/doc/pocl/pocl_binary.rst
/usr/share/doc/pocl/using.rst
/usr/share/licenses/pocl
/usr/share/licenses/pocl/LICENSE
/usr/share/pocl
/usr/share/pocl/include
/usr/share/pocl/include/_builtin_renames.h
/usr/share/pocl/include/_clang_opencl.h
/usr/share/pocl/include/_enable_all_exts.h
/usr/share/pocl/include/_kernel.h
/usr/share/pocl/include/_kernel_c.h
/usr/share/pocl/include/_kernel_constants.h
/usr/share/pocl/include/_libclang_versions_checks.h
/usr/share/pocl/include/opencl-c-base.h
/usr/share/pocl/include/opencl-c.h
/usr/share/pocl/include/pocl.h
/usr/share/pocl/include/pocl_device.h
/usr/share/pocl/include/pocl_image_types.h
/usr/share/pocl/include/pocl_spir.h
/usr/share/pocl/include/pocl_types.h
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx2.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx512.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx_f16c.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx_fma4.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-sse2.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-sse41.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-ssse3.bc
/etc/OpenCL/vendors/pocl.icd
/usr/lib/.build-id
/usr/lib/.build-id/04
/usr/lib/.build-id/04/e60d306c68e87ab0b5c7d244fa8d81ca5c03aa
/usr/lib/.build-id/58
/usr/lib/.build-id/58/4db641ffa8b6a12b1b76cb74c90a47b645a07a
/usr/lib/.build-id/75
/usr/lib/.build-id/75/95406c92ca157d527da0761f882874b07ed8d6
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/80a74fb8422a9a9a09dc215cf9d85187dd7774
/usr/lib/libpocl.so.2
/usr/lib/libpocl.so.2.7.0
/usr/lib/pocl
/usr/lib/pocl/libllvmopencl.so
/usr/lib/pocl/libpocl-devices-basic.so
/usr/lib/pocl/libpocl-devices-pthread.so
/usr/share/doc/pocl
/usr/share/doc/pocl/README
/usr/share/doc/pocl/accel.rst
/usr/share/doc/pocl/conformance.rst
/usr/share/doc/pocl/cuda.rst
/usr/share/doc/pocl/debug.rst
/usr/share/doc/pocl/design.rst
/usr/share/doc/pocl/development.rst
/usr/share/doc/pocl/faq.rst
/usr/share/doc/pocl/features.rst
/usr/share/doc/pocl/host_library.rst
/usr/share/doc/pocl/hsa.rst
/usr/share/doc/pocl/index.rst
/usr/share/doc/pocl/install.rst
/usr/share/doc/pocl/kernel_compiler.rst
/usr/share/doc/pocl/memory_management.rst
/usr/share/doc/pocl/opencl_status.rst
/usr/share/doc/pocl/pocl_binary.rst
/usr/share/doc/pocl/using.rst
/usr/share/licenses/pocl
/usr/share/licenses/pocl/LICENSE
/usr/share/pocl
/usr/share/pocl/include
/usr/share/pocl/include/_builtin_renames.h
/usr/share/pocl/include/_clang_opencl.h
/usr/share/pocl/include/_enable_all_exts.h
/usr/share/pocl/include/_kernel.h
/usr/share/pocl/include/_kernel_c.h
/usr/share/pocl/include/_kernel_constants.h
/usr/share/pocl/include/_libclang_versions_checks.h
/usr/share/pocl/include/opencl-c-base.h
/usr/share/pocl/include/opencl-c.h
/usr/share/pocl/include/pocl.h
/usr/share/pocl/include/pocl_device.h
/usr/share/pocl/include/pocl_image_types.h
/usr/share/pocl/include/pocl_spir.h
/usr/share/pocl/include/pocl_types.h
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx2.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx512.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx_f16c.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-avx_fma4.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-sse2.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-sse41.bc
/usr/share/pocl/kernel-i686-pc-linux-gnu-ssse3.bc
/etc/OpenCL/vendors/pocl.icd
/usr/lib/.build-id
/usr/lib/.build-id/47
/usr/lib/.build-id/47/0d293abdd659c87684e548f6ccebdd86d891bb
/usr/lib/.build-id/79
/usr/lib/.build-id/79/e2252bfd1a9d03f0a41cba8c67af922b594fc8
/usr/lib/.build-id/ba
/usr/lib/.build-id/ba/6c50c9e7fd2dcf85df8ae0442a7c947c836e06
/usr/lib/.build-id/fa
/usr/lib/.build-id/fa/bcba5e1b03961aeb8fb1c235fbf2d4cb0d0611
/usr/lib64/libpocl.so.2
/usr/lib64/libpocl.so.2.7.0
/usr/lib64/pocl
/usr/lib64/pocl/libllvmopencl.so
/usr/lib64/pocl/libpocl-devices-basic.so
/usr/lib64/pocl/libpocl-devices-pthread.so
/usr/share/doc/pocl
/usr/share/doc/pocl/README
/usr/share/doc/pocl/accel.rst
/usr/share/doc/pocl/conformance.rst
/usr/share/doc/pocl/cuda.rst
/usr/share/doc/pocl/debug.rst
/usr/share/doc/pocl/design.rst
/usr/share/doc/pocl/development.rst
/usr/share/doc/pocl/faq.rst
/usr/share/doc/pocl/features.rst
/usr/share/doc/pocl/host_library.rst
/usr/share/doc/pocl/hsa.rst
/usr/share/doc/pocl/index.rst
/usr/share/doc/pocl/install.rst
/usr/share/doc/pocl/kernel_compiler.rst
/usr/share/doc/pocl/memory_management.rst
/usr/share/doc/pocl/opencl_status.rst
/usr/share/doc/pocl/pocl_binary.rst
/usr/share/doc/pocl/using.rst
/usr/share/licenses/pocl
/usr/share/licenses/pocl/LICENSE
/usr/share/pocl
/usr/share/pocl/include
/usr/share/pocl/include/_builtin_renames.h
/usr/share/pocl/include/_clang_opencl.h
/usr/share/pocl/include/_enable_all_exts.h
/usr/share/pocl/include/_kernel.h
/usr/share/pocl/include/_kernel_c.h
/usr/share/pocl/include/_kernel_constants.h
/usr/share/pocl/include/_libclang_versions_checks.h
/usr/share/pocl/include/opencl-c-base.h
/usr/share/pocl/include/opencl-c.h
/usr/share/pocl/include/pocl.h
/usr/share/pocl/include/pocl_device.h
/usr/share/pocl/include/pocl_image_types.h
/usr/share/pocl/include/pocl_spir.h
/usr/share/pocl/include/pocl_types.h
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx2.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx512.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx_f16c.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-avx_fma4.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-sse2.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-sse41.bc
/usr/share/pocl/kernel-x86_64-unknown-linux-gnu-ssse3.bc

References

Summary

In this tutorial we learn how to install pocl on Fedora 34 using yum and dnf.