It is currently Thu Mar 28, 2024 5:30 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
Offline
 Post subject: Katago CUDA version how to use
Post #1 Posted: Thu Mar 05, 2020 10:16 am 
Dies in gote

Posts: 26
Liked others: 11
Was liked: 1
Rank: ogs 12k
KGS: 12k
Tygem: 12k
IGS: 6k+
Wbaduk: 12k
DGS: 5k
OGS: 10k
Online playing schedule: turn-based only
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.

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #2 Posted: Fri Mar 06, 2020 12:02 am 
Dies in gote

Posts: 61
Liked others: 12
Was liked: 18
Universal go server handle: 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:
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!

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #3 Posted: Fri Mar 06, 2020 1:18 am 
Oza
User avatar

Posts: 2401
Location: Tokyo, Japan
Liked others: 2338
Was liked: 1332
Rank: Jp 6 dan
KGS: 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.

_________________
Dave Sigaty
"Short-lived are both the praiser and the praised, and rememberer and the remembered..."
- Marcus Aurelius; Meditations, VIII 21


This post by ez4u was liked by 2 people: dino1019, Waylon
Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #4 Posted: Sun Mar 08, 2020 2:38 am 
Dies in gote

Posts: 26
Liked others: 11
Was liked: 1
Rank: ogs 12k
KGS: 12k
Tygem: 12k
IGS: 6k+
Wbaduk: 12k
DGS: 5k
OGS: 10k
Online playing schedule: turn-based only
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.

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #5 Posted: Sun Mar 08, 2020 3:11 am 
Dies in gote

Posts: 26
Liked others: 11
Was liked: 1
Rank: ogs 12k
KGS: 12k
Tygem: 12k
IGS: 6k+
Wbaduk: 12k
DGS: 5k
OGS: 10k
Online playing schedule: turn-based only
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.

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #6 Posted: Sun Mar 08, 2020 4:18 am 
Dies in gote

Posts: 61
Liked others: 12
Was liked: 18
Universal go server handle: 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.


Last edited by Jæja on Sun Mar 08, 2020 7:05 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #7 Posted: Sun Mar 08, 2020 7:03 am 
Dies in gote

Posts: 26
Liked others: 11
Was liked: 1
Rank: ogs 12k
KGS: 12k
Tygem: 12k
IGS: 6k+
Wbaduk: 12k
DGS: 5k
OGS: 10k
Online playing schedule: turn-based only
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)

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #8 Posted: Sun Mar 08, 2020 7:08 am 
Dies in gote

Posts: 61
Liked others: 12
Was liked: 18
Universal go server handle: 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! :tmbup:

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #9 Posted: Sun Mar 08, 2020 10:57 am 
Gosei

Posts: 1733
Location: Earth
Liked others: 621
Was liked: 310
What are your experiences with the CUDA version? Do you see a great difference in performance? Thank you for your feedback.

Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #10 Posted: Tue Mar 10, 2020 2:23 pm 
Gosei
User avatar

Posts: 1348
Liked others: 202
Was liked: 203
"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


This post by And was liked by: Gomoto
Top
 Profile  
 
Offline
 Post subject: Re: Katago CUDA version how to use
Post #11 Posted: Sat Mar 14, 2020 6:40 pm 
Dies in gote

Posts: 26
Liked others: 11
Was liked: 1
Rank: ogs 12k
KGS: 12k
Tygem: 12k
IGS: 6k+
Wbaduk: 12k
DGS: 5k
OGS: 10k
Online playing schedule: turn-based only
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.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group