lightvector / KataGo

GTP engine and self-play learning in Go
https://katagotraining.org/
Other
3.57k stars 564 forks source link

Documentation of build requirements for v1.11.0 on Linux: seems to need new packages #620

Open PJTraill opened 2 years ago

PJTraill commented 2 years ago

Perhaps it is handy to mention new dependencies in the 1.11.0 information. My build on openSUSE for OpenCL failed on <zip.h> and <CL/cl.h>, which I resolved by installing packages libzip-devel & opencl-headers. (I also added libclc & opencl-cpp-headers but I presume they were unnecessary.)

It then also wanted /usr/lib64/libOpenCL.so, while I ¿since openSUSE 15.3? have /usr/lib64/libOpenCL.so.1 , which I was able to force by specifying -DOpenCL_LIBRARY=/usr/lib64/libOpenCL.so.1 to cmake, so also not a big problem. But if anything has changed here, it would be kind to mention it. In any case, a mention of this option in Compiling.md might be helpful.

lightvector commented 2 years ago

There aren't any new dependencies in 1.11.0. The cmake configuration for Linux did not change at all since 1.10.0, except for refactoring some KataGo source files into multiple pieces. No new external libraries were used and no cmake options or flags were changed.

Did something change on your system? (edit: fixed confusing typo)

lightvector commented 2 years ago

I think https://github.com/lightvector/KataGo/blob/master/Compiling.md has always been missing tips/advice for installing OpenCL, even pre-v1.10, so the pointer to opencl-headers seems useful, good catch thanks.

For the OpenCL lib, rather than just the include, the same is true, but the issue seems far more confusing to me, for example, e.g. https://github.com/Microsoft/LightGBM/issues/405. Reading through threads like this I'm not sure what to advise. Normally cmake is pretty good about searching all the possibilities for a library all by itself, but looks like that's not the case here, and seems like it depends on the particular GPU vendor, version of OS and possibly the manner in which one chose to install things (e.g. CUDA offers 3 different ways to install it).

What would you suggest to be most useful to add to the documentation here?

PJTraill commented 2 years ago

Did something change on your system?

Maybe I did change something. I have not been using my build much since I started getting the impression that the NVIDIA driver was rendering my battery unusable when not plugged in! I no longer have a clear timeline, but I have updated to OpenSUSE 15.3 at some point.

PJTraill commented 2 years ago

the pointer to opencl-headers seems useful,

But packaging seems to vary across distributions, so hard to know exactly what to say.

What would you suggest to be most useful to add to the documentation here?

I would add a bullet point saying something like

Alternatively, if the instructions start to seem unwieldy, split off options&c. into sections per library/backend/GPU/&c., saying refer to sections for your configuration, but that may be harder to read.

But I know very little (≈ nothing) about conventions like .1. Also I am a little surprised that it should depend on the GPU vendor, as I thought that the package libOpenCL1 (which supplied my libOpenCL.so.1) was vendor-agnostic, at least in this respect. But I can well believe that it depends on the distribution / package supplier. microsoft/LightGBM#405 did not mean much to me.