Cordell Bloor:
Hi Ximin,

On 2025-11-17 13:54, Ximin Luo wrote:
When I install leela-zero and rocm-opencl-icd (from sid), then run leelaz, I 
get the following error:

Error building kernels: fatal error: malformed or corrupted precompiled file: 
'could not find file '/usr/lib/llvm-21/lib/clang/21/include/opencl-c-base.h' 
referenced by AST file '/tmp/comgr-e99bbb/include/opencl1.2-c.pch''

Installing libclang-common-21-dev which contains this file, fixes the problem.

Thank you for the report! That's an interesting problem. I think I need to investigate a 
bit to understand what's actually happening before I add the dependency. However, I'm 
struggling to find a compatible set of weights for leela-zero on sid. Everything I try 
seems to result in an error stating "Weights file is the wrong version." Could 
you provide a more detailed set of steps to reproduce the problem?


Ah, I last downloaded the weights file back in 2021, the upstream project may 
have moved on in the meantime. I've uploaded my old one here:

https://people.debian.org/~infinity0/leelaz/

You can drop it into ~/.local/share/leela-zero/best-network then it should work.

When I experiment running other OpenCL applications, such as clpeak or 
clblast-tests, I don't seem to have the same problem. I suppose this must be 
related to a particular rocm-opencl-icd feature that (in turn) depends on a 
particular libamd-comgr3 feature.

It's good that it seems that there's a straightforward workaround.

Sincerely,
Cory Bloor


Thanks for taking a look! Unfortunately I don't know anything about how this stuff works 
in terms of the GPU technical details. But you can get the corresponding old version of 
the source code via "apt source leela-zero", that should tell you how this old 
version of the weights is actually being used.

Best,
Ximin

--
GPG: ed25519/56034877E1F87C35
https://github.com/infinity0/pubkeys.git

Reply via email to