Hi Ximin,
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?
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