-
Notifications
You must be signed in to change notification settings - Fork 670
Description
Description
I compiled KataGo from source on Windows using MSYS2 MinGW-w64 with OpenCL backend. The resulting executable runs perfectly on my own machine. However, when I transfer it to another computer (also Windows), I encountered the following issues:
- Initially, it failed with CL_BUILD_PROGRAM_FAILURE for conv2dNCHWProgram on device 0.
- After updating the graphics driver on that computer, the program now crashes immediately (no error message, just terminates). The official pre-built KataGo v1.16.4 OpenCL version runs without any problem on the same machine.
I have tried various adjustments (disabling fp16 in config, setting -DCL_TARGET_OPENCL_VERSION=120 during compilation, ensuring all required DLLs are bundled), but the issue persists. I'm opening this issue to seek guidance on what might be causing the incompatibility and how to make my build as portable as the official release.
Environment & Build Steps:
- Host OS: Windows 11
- Target OS: Windows Server 2022
- Compiler: MSYS2 MinGW-w64 (gcc 15.2.0)
cmake .. -G Ninja -DUSE_BACKEND=OPENCL -DCMAKE_BUILD_TYPE=Release -DZLIB_INCLUDE_DIR="/d/msys64/mingw64/include" -DZLIB_LIBRARY="/d/msys64/mingw64/lib/libz.a" -DLIBZIP_INCLUDE_DIR_ZIP="/d/msys64/mingw64/include" -DLIBZIP_INCLUDE_DIR_ZIPCONF="/d/msys64/mingw64/include" -DLIBZIP_LIBRARY="/d/msys64/mingw64/lib/libzip.dll.a" -DNO_GIT_REVISION=1 -DNO_LIBZIP=0
Error Details:
Uncaught exception: CL_BUILD_PROGRAM_FAILURE
BUILD LOG FOR conv2dNCHWProgram ON DEVICE 0
After driver update: The program crashes silently (Windows "katago.exe has stopped working"). The official KataGo release (v1.16.4) runs perfectly on the same machine.
What I've tried so far:
- Updated GPU drivers on the target machine (which changed the error from build failure to crash).
- Verified all required DLLs are present (no missing DLL errors).
- Added -DCL_TARGET_OPENCL_VERSION=120 to restrict OpenCL to 1.2 API.
Question:
What could cause my build to fail on another PC while the official build works? Are there specific compiler flags or runtime settings that the official build uses to ensure broad compatibility? Any suggestions to make my version as portable as the official one would be greatly appreciated.
Thank you for your time and for this great project!