Page 1 of 1
Katago CUDA version how to use
Posted: Thu Mar 05, 2020 10:16 am
by dino1019
Anyone knows how to set up the environment for running the CUDA version? I have a Windows 10 64 bit + ASUS NVIDIA 2060
If I run this command:
C:/katago-v1.3.3-cuda10.1-windows-x64/katago.exe gtp -config C:/katago-v1.3.3-cuda10.1-windows-x64/gtp_example.cfg -model C:/katago-v1.3.3-cuda10.1-windows-x64/g170e_20b_s243G.bin.gz
It complaints the following two dlls not found: cublas64_10.dll, cudnn64_7.dll
In the katago how to use, it seems not telling us how to install CUDA, CUDNN, TensorFlow, etc..
Anyone shed some light?
Thanks, in advance.
Re: Katago CUDA version how to use
Posted: Fri Mar 06, 2020 12:02 am
by Jæja
For macOS and Linux, I find it easiest to use
Anaconda (check out
Miniconda for just the package manager, without default packages). I notice you use Windows 10, for which Anaconda has support as well, though I haven't tested this myself.
You can then just install packages using the
conda command, for example:
Code: Select all
conda install -c anaconda cudatoolkit cudnn
EDIT: the
KataGo GitHub repository refers to two GPU-related dependencies (the ones you seem to be missing):
CUDA and
CUDNN. If that's all you need, then you could try installing manually. The latest Windows release package is named
katago-v1.3.3-cuda10.1-windows-x64.zip so you'll need CUDA version 10.1.
Read this if you run into compatibility issues between your graphics card driver and CUDA. On
this page Table 1 shows the minimum supported graphics card driver for CUDA toolkit 10.1 is 418.39, so ensure you have at least that version. If you still have issues, check the
supported hardware page. For a GeForce 2060 Ti it shows the compute capability is 7.5. On Table 2 of the
previously mentioned page you can see that the hardware generation must be
Volta and all mentioned drivers are supported. Also notice that it seems that if you have the latest driver, all generations are supported.
I'm a computer scientist and this is how I go about these things. I try to understand what the different components are supposed to do and how I should install them. I can imagine this is not the easiest way for many people, because of the technical terms, but I hope this helps!
Re: Katago CUDA version how to use
Posted: Fri Mar 06, 2020 1:18 am
by ez4u
First you should search your machine to check whether you already have those dll's somewhere. I had that cudnn64_7.dll error message. I searched my machine and found that it was there but katago simply was not finding it. I copied it straight to the katago directory rather than trying to fool with paths and such issues. Things ran fine.
Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 2:38 am
by dino1019
ez4u wrote:First you should search your machine to check whether you already have those dll's somewhere. I had that cudnn64_7.dll error message. I searched my machine and found that it was there but katago simply was not finding it. I copied it straight to the katago directory rather than trying to fool with paths and such issues. Things ran fine.
I did searched for the two DLLs, and found nothing.
Now I am downloading CUDA 10.2 from the following page, it's about 1.3G in size:
https://developer.nvidia.com/cuda-downl ... e=exelocal
I will if this works.
Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 3:11 am
by dino1019
I have installed it (cuda_10.2.89_441.22_win10.exe), but only one DLL is found: cublas64_10.dll, but the other is not: cudnn64_7.dll, is there something else to install? Thanks again.
Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 4:18 am
by Jæja
dino1019 wrote:I have installed it (cuda_10.2.89_441.22_win10.exe), but only one DLL is found: cublas64_10.dll, but the other is not: cudnn64_7.dll, is there something else to install? Thanks again.
Did you read my post at all?
Jæja wrote:KataGo GitHub repository refers to two GPU-related dependencies (the ones you seem to be missing):
CUDA and
CUDNN. If that's all you need, then you could try installing manually. The latest Windows release package is named
katago-v1.3.3-cuda10.1-windows-x64.zip so you'll need CUDA version 10.1.
You installed the wrong version of CUDA (if you're using the latest KataGo pre-built package) and you didn't install CUDNN.
Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 7:03 am
by dino1019
Jæja wrote:dino1019 wrote:I have installed it (cuda_10.2.89_441.22_win10.exe), but only one DLL is found: cublas64_10.dll, but the other is not: cudnn64_7.dll, is there something else to install? Thanks again.
Did you read my post at all?
Jæja wrote:KataGo GitHub repository refers to two GPU-related dependencies (the ones you seem to be missing):
CUDA and
CUDNN. If that's all you need, then you could try installing manually. The latest Windows release package is named
katago-v1.3.3-cuda10.1-windows-x64.zip so you'll need CUDA version 10.1.
You installed the wrong version of CUDA (if you're using the latest KataGo pre-built package and you didn't install CUDNN.
Thanks again.
I have copied cudnn64_7.dll from the CUDDN download from NVDIA, and it seems to work with the following command:
C:\Users\User>C:/katago-v1.3.3-cuda10.1-windows-x64/katago.exe gtp -config C:/katago-v1.3.3-cuda10.1-windows-x64/gtp_example.cfg -model C:/katago-v1.3.3-cuda10.1-windows-x64/g170e_20b_s2.43G.bin.gz
KataGo v1.3.3
Loaded model C:/katago-v1.3.3-cuda10.1-windows-x64/g170e_20b_s2.43G.bin.gz
Model name: g170-b20c256x2-s2430231552-d525879064
GTP ready, beginning main protocol loop
Note that the CUDA version installed is 10.2, not 10.1, but since the technical support of Ah-Q says "CUDA 10.1 or above should work", so maybe this is not an issue (see note at the bottom). Still Ah-Q to remotely connect via SSH with Katago/CUDA doesn't work, I have raise this issue to the technical support of Ah-Q again; note again, the remote connection with Katago/OpenCL and with Leela Zero works very well.
(note: the following is about CUDA's versions:
Latest Release
CUDA Toolkit 10.2 (Nov 2019), Versioned Online Documentation
Archived Releases
CUDA Toolkit 10.1 update2 (Aug 2019), Versioned Online Documentation
CUDA Toolkit 10.1 update1 (May 2019), Versioned Online Documentation
CUDA Toolkit 10.1 (Feb 2019), Online Documentation)
Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 7:08 am
by Jæja
dino1019 wrote:Note that the CUDA version installed is 10.2, not 10.1, but since the technical support of Ah-Q says "CUDA 10.1 or above should work", so maybe this is not an issue (see note at the bottom). Still Ah-Q to remotely connect via SSH with Katago/CUDA doesn't work
I have no idea what Ah-Q Go has to do with this. Your question was about enabling KataGo to work with CUDA and now the topic switches to Ah-Q Go and connecting over SSH. Your should try to be more precise and remain on-topic, because this keeps things clear and saves a lot of time.
I'm glad it works now!

Re: Katago CUDA version how to use
Posted: Sun Mar 08, 2020 10:57 am
by Gomoto
What are your experiences with the CUDA version? Do you see a great difference in performance? Thank you for your feedback.
Re: Katago CUDA version how to use
Posted: Tue Mar 10, 2020 2:23 pm
by And
"It is possible to compile KataGo against various versions of the CUDA toolkit. ...a short performance test (just the default benchmark really) on each."
https://github.com/lightvector/KataGo/i ... -578684523
Re: Katago CUDA version how to use
Posted: Sat Mar 14, 2020 6:40 pm
by dino1019
Hi all,
As an update, I have successfully configured the CUDA version as part of the whole thing as in the following remote scenario:
1. client: Ah-Q pro, android app, SSH client, GUI to play, analyze and review games, can connect local engine or remote engines, GTP compatible.
2. server: Windows 10 64 bit, SSH server, Leela Zero/GPU, Katago/OpenCL, Katago/CUDA.
3. Both Leela Zero and Katago engines are GTP compatible, so the command lines are quite standard.
4. Leela Zero/GPU, Katago/OpenCL, Katago/CUDA require GPU; Katago/CUDA require NVIDIA GPU. (note that it seems Katago/CUDA is not necessarily faster than Katago/OpenCL)
5. Ah-Q pro has an android version, but not Windows version, and PC version is probably also needed in this (remote) area. Ah-Q can have multiple engines configured, but the engine management is not very friendly, so this is an area for future improvement.
If you have any question or comment about remote engine, please let me know. Go AI is evolving quickly, and can be difficult to non-tech-savvy go players; in the meantime, I don't believe go AI is good enough to serve as a sole teacher to help humans improve; so it's important we help each other out.