Description
Running RUSTICL_ENABLE=radeonsi clinfo
with the latest llvm-toolchain-snapshot
packages from apt.llvm.org results in the following error:
Libclc failed to load. Please make sure it is installed and provides spirv-mesa3d-.spv and/or spirv64-mesa3d-.spv
Later in the output clinfo
reports, that no devices were found.
At the moment the llvm-toolchain-snapshot
packages won't install any *.spv
artifacts in libclc
, see https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/snapshot/debian/libclc-X.Y.install.in#L2
On top of that non will be built, because debian/rules
tests for the existence of llvm-spirv
or llvm-spirv-$LLVM_VERSION
in https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/snapshot/debian/rules#L359-L363 (which should never be true).
This is a bit of a hen egg issue, since you need LLVM/CLang headers available (besides the spirv-headers
and the spirv-tools
). Thus you could either do the libclc build extra and have the other parts built individually (first LLVM/CLang, then the headers, tools, then llvm-spirv
and finally libclc) or, if I read https://github.com/llvm/llvm-project/blob/main/libclc/CMakeLists.txt#L109 correctly, by providing the required sources in the LLVM build tree.
llvm-spirv
from https://github.com/KhronosGroup/SPIRV-LLVM-Translator must match the major version of LLVM (and usually needs to be pretty up-to-date for it to be buildable with HEAD
of LLVM. So far Debian has an individual spirv-llvm-translator package, but that hasn't been updated in a while. And I have no idea what would be better with regards to the apt.llvm.org build of libclc (ie. providing llvm-spirv
in-tree or building it extra).
Anyway: please provide the spirv-mesa3d-
and spirv64-mesa3d-
targets in the apt.llvm.org Debian package builds of llvm-toolchain-snapshot
. Thanks!