ROCm / ROCm-OpenCL-Runtime

ROCm OpenOpenCL Runtime
166 stars 60 forks source link

Distro/packaging related fixes #146

Closed Mystro256 closed 2 years ago

Mystro256 commented 2 years ago

Please note that I've already merged these patches internally, I've just pushed them here for the benefit of the community. I expect these patches to be in github in a few weeks.

These are mostly patches that would be useful to distros or anyone trying to package rocm-opencl.

Patch 1 allows overriding the install directories by setting the CMAKEINSTALL* variables using -D Patch 2 and 3 allow using the system ICD if the dev/devel package is installed, i.e. rocm-opencl will still compile if you delete the khronos/icd directory (useful for code debundling). Patch 4 fixes an install related issue where including the installed cl_icd.h from rocm-opencl will cause compilation issues.

A word of caution: distros appear to be packaging an OCL ICD loader that does not have GL-CL interopt support. It's highly recommended to use the official khronos ICD loader: https://github.com/KhronosGroup/OpenCL-ICD-Loader

Mystro256 commented 2 years ago

All changes have been merged into github, so closing