OpenVX/OpenCL setup for AMD CPU and GPU

Hello dear people,

I am trying to setup an openvx/opencl environment using nixos. I am struggling with opencl at the moment. I used this pull request to get support for my graphics card (AMD FX 580), the rocm package did not work for me, since my cpu (AMD FX-8350) does not support PCIe 3.0 and therefore atomics (which is required for rocm). To support my CPU I include pocl, which works fine on its own using this derivation, but once inside the nix-shell, I can no longer access the GPU acceleration (clinfo does no longer find the device) So I attempted to include the package into hardware.opengl.extraPackages in my nixconfig, but it is not being picked up from there. I would also like to create a package for the openvx tools from AMD using the accelerators.

So my questions are:

  • does anybody have a working setup they would like to share?
  • how do I properly include the pocl package into my system? (CPU and GPU devices available at the same time)
  • how do I make both of the devices visible to the AMD openvx package?

Any help is greatly appreciated!!

The opencl.nix can be found here