compute-runtime
compute-runtime copied to clipboard
ocloc (without suffix) missing from compute-runtime builds
Since https://github.com/intel/compute-runtime/commit/bbe11205e3605d9d4e53dfe9d1a2f8857f294d42, there are only suffixed versions of ocloc being built.
Some distribution package specific code calls update-alternatives at install time to then symlink a version of ocloc: https://github.com/intel/compute-runtime/blob/b6038de550f3b7a411217ae6d4b4d8360d03d3a8/scripts/packaging/opencl/sles_15/SPECS/opencl.spec#L118 so on such distributions, after installing built packages, calling "ocloc" works.
However:
- compute-runtime can't be compiled and used in-place (by toolchains like DPC++ that call ocloc on path) unless locally installed with a package manager. With Blender I had to patch it out: https://projects.blender.org/blender/blender/src/branch/blender-v4.3-release/build_files/build_environment/patches/ocloc.diff
- not all distributions support such model with update-alternatives - as an example, archlinux doesn't.
Will there be a new ocloc entry point able to use both new and legacy ocloc at the same time? Until then, can you support building a binary called ocloc without suffix, or an ocloc symlink to the version that supports current platforms being built?
Ideally this should be the default, and the update-alternatives method could be enabled behind a CMake flag instead.