There is an updated pull request by ahesford against master on the void-packages repository https://github.com/ahesford/void-packages rocm https://github.com/void-linux/void-packages/pull/21153 New packages: ROCm core and OpenCL This PR includes several packages designed to bring the OpenCL portion of the AMD ROCm ecosystem to Void. It addresses Issue #19507. There are many other packages that AMD provides for GPGPU computing, but these can be added piecemeal as users demand. The packages are currently only for `x86_64*`. While at least some of the packages will compile on other 64-bit architectures, I have no hardware to test. They are certainly not suitable for 32-bit architectures; some internal data structures rely on `uint64_t` values that are cast to pointers. At a minimum, a thorough audit would be necessary to ensure that these casts are safe (e.g., that the values stored were only ever upcast from 32-bit pointers). More extensive work may be necessary to support 32-bit architectures, probably without significant benefit. The packages successfully identify a Radeon RX 580 on an `x86_64` installation using both `clinfo` and `rocminfo` as provided. Furthermore, a version of `pyopencl` linked against these ROCm packages successfully runs a simple program that validates arithmetic on GPU-bound arrays. There are caveats with this set of packages, almost all of which revolve around the incompatibilities between the Void-provided `ocl-icd` and the [Khronos OpenCL ICD loader](https://github.com/KhronosGroup/OpenCL-ID-Loader) required by (and built into) `rocm-opencl-runtime`. 1. All packages install into `/opt/rocm`. This keeps the environment closer to that officially sanctioned by AMD and helps avoid conflicts between other packages and those provided here. (For example, `clinfo` and the ICD loader itself.) Eventually, we may be able to move the files into `/usr`. 2. The Khronos OpenCL ICD loader built into `rocm-opencl-runtime` is an outdated, pre-release commit. If AMD can update its sources to use the release version of that loader (which has a backward-incompatible API change), we may be able to make ROCm compatible with `ocl-icd` or replace `ocl-icd` with the official Khronos loader. 3. In the meantime, to avoid `shlibs` conflicts, the OpenCL ICD loader is installed as `/opt/rocm/lib/libOpenCL-ROCm.so` (and an appropriately versioned shared library), which means that programs wishing to use the ROCm OpenCL must explicitly link against this library instead of the generic `libOpenCL.so`. 4. I do **not** recommend making any Void packages link against this specific library, because it will make those packages ROCm-only. For the time being, ROCm is intended for end-users to specifically link against. Linking Void packages against ROCm would requires the ICD loader used by ROCm be compatible with `ocl-icd`, or `ocl-icd` be replaced by the Khronos loader. However, because the Khronos loader changed its API for the release version, such a change is not yet appropriate. Hopefully, if AMD updates its dependence on the Khronos ICD loader, we can resolve some of these caveats in the future and make ROCm a more natural Void component. For now, these packages are useful for those who need an AMD OpenCL solution and would rather custom-link software against the AMD ICD loader than hack the `amdgpu-pro` driver into an ICD compatible with `ocl-icd`. Some patches were made to relocate some files in `/opt/rocm` and make everyting build on x86_64-musl`. Where appropriate, these patches will be pushed upstream to clean up the distribution and packaging. Update: I pushed some new commits to update license information that triggerd an `xlint` failure. I've also disabled CI builds because they will time out on `rocm-llvm`. A patch file from https://github.com/void-linux/void-packages/pull/21153.patch is attached